Fix use_count() in SharedPtr

pull/7815/head
Donatien Garnier 2018-08-21 12:59:54 +01:00
parent 7086d69a83
commit 298f847821
1 changed files with 2 additions and 1 deletions

View File

@ -175,8 +175,9 @@ public:
{
if (_ptr != NULL) {
core_util_critical_section_enter();
return *_counter;
uint32_t current_counter = *_counter;
core_util_critical_section_exit();
return current_counter;
} else {
return 0;
}