Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential memory leak #241

Merged
merged 1 commit into from Jun 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
Expand Up @@ -475,7 +475,10 @@ void Fl_WinAPI_Window_Driver::hide() {
}
}

if (hide_common()) return;
if (hide_common()) {
delete[] doit; // note: `count` and `doit` may be NULL (see PR #241)
return;
}

// make sure any custom icons get freed
// icons(NULL, 0); // free_icons() is called by the Fl_Window destructor
Expand Down