FLUID: fixing autodocs file leak and memory leak

This commit is contained in:
Matthias Melcher 2024-11-19 23:27:03 +01:00
parent c6d480352b
commit 6df2219aa0
2 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,7 @@ static int convert_RGB_to_RGBA(Fl_RGB_Image *&img) {
delete img;
// Create the new image
img = new Fl_RGB_Image(data, img_w, img_h, 4);
delete[] data;
return 0;
}

View File

@ -2302,6 +2302,8 @@ int main(int argc,char **argv) {
// check if the user wants FLUID to generate image for the user documentation
if (!g_autodoc_path.empty()) {
run_autodoc(g_autodoc_path);
set_modflag(0, 0);
exit_cb(0,0);
return 0;
}
#endif