Fix potential race condition.
Found when I noticed that the unit tests segfaulted every once in a while. Test: Ran all unit tests 1000 times. The crash usually happens before 100 runs. Change-Id: I1c8d2e3637400dc80f273f3677f4c94b0dbeac9d
This commit is contained in:
parent
4a8d436ad1
commit
d1d973be12
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ MapInfo::~MapInfo() {
|
|||
|
||||
std::string MapInfo::GetBuildID() {
|
||||
uintptr_t id = build_id.load();
|
||||
if (build_id != 0) {
|
||||
if (id != 0) {
|
||||
return *reinterpret_cast<std::string*>(id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue