Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
safe thread.join()
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Feb 20, 2015
1 parent 79c13e2 commit bb8cedf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mbgl/map/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ Map::~Map() {
assert(asyncTerminate);
asyncTerminate->send();

thread.join();
if (thread.get_id() != std::thread::id()) {
thread.join();
}

// Make sure that all of these are empty.
assert(!sprite);
Expand Down

0 comments on commit bb8cedf

Please sign in to comment.