Skip to content

Commit

Permalink
Fix potential leak
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMacocian committed Aug 1, 2024
1 parent 995cc3d commit 942d8f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GWToolboxdll/Windows/Pathfinding/PathfindingWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,9 @@ bool PathfindingWindow::CalculatePath(const GW::GamePos& from, const GW::GamePos
Resources::EnqueueMainTask([waypoints, callback, stop_token, args] {
if (!stop_token.stop_requested()) {
callback(*waypoints, args);
delete waypoints;
}

delete waypoints;
});
}
}
Expand Down

0 comments on commit 942d8f4

Please sign in to comment.