Fix potential memory leak (#241)

Signed-off-by: Albrecht Schlosser <albrechts.fltk@online.de>
This commit is contained in:
fire-eggs 2021-06-23 11:04:03 -04:00 committed by Albrecht Schlosser
parent 571ff10553
commit c21732705c

View File

@ -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