Skip to content

Commit

Permalink
Merge pull request #1567 from Karry/fix-null-pointer-deref
Browse files Browse the repository at this point in the history
fix null pointer dereference
  • Loading branch information
Framstag authored Apr 13, 2024
2 parents 457317c + 6b73325 commit 1326c9b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libosmscout/src/osmscout/routing/MultiDBRoutingService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@ namespace osmscout {
}

for (auto& handle : handles) {
handle.routingDatabase->Close();
handle.routingDatabase.reset();
handle.router->Close();
handle.router.reset();
if (handle.routingDatabase) {
handle.routingDatabase->Close();
handle.routingDatabase.reset();
}
if (handle.router) {
handle.router->Close();
handle.router.reset();
}
handle.profile.reset();
}

Expand Down

0 comments on commit 1326c9b

Please sign in to comment.