Skip to content

Commit 03c3e30

Browse files
Leon Skoogeliasdaler
Leon Skoog
authored andcommitted
Prevent leaking memory on cursors
- delete all allocated cursors
1 parent 4129d27 commit 03c3e30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imgui-SFML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ struct WindowContext {
223223
~WindowContext() {
224224
delete fontTexture;
225225
for (int i = 0; i < ImGuiMouseCursor_COUNT; ++i) {
226-
if (mouseCursorLoaded[i]) {
226+
if (mouseCursors[i] != nullptr) {
227227
delete mouseCursors[i];
228228
}
229229
}

0 commit comments

Comments
 (0)