Skip to content

Commit

Permalink
Fix segfault on improperly timed reload call
Browse files Browse the repository at this point in the history
  • Loading branch information
maurhofer-ubique committed May 31, 2024
1 parent 0f23d1e commit 96d37bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shared/src/map/layers/tiled/vector/Tiled2dMapVectorLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,12 @@ void Tiled2dMapVectorLayer::reloadDataSource(const std::string &sourceName) {
}

void Tiled2dMapVectorLayer::reloadLocalDataSource(const std::string &sourceName, const std::string &geoJson) {

std::lock_guard<std::recursive_mutex> lock(mapDescriptionMutex);

if (!mapInterface) {
auto mapInterface = this->mapInterface;
auto mapDescription = this->mapDescription;

if (!mapInterface || !mapDescription) {
return;
}

Expand Down

0 comments on commit 96d37bf

Please sign in to comment.