Fix memory leaks when doing "Save & Quit"
authorJulian Eisel <eiseljulian@gmail.com>
Thu, 22 Mar 2018 22:29:48 +0000 (23:29 +0100)
committerJulian Eisel <eiseljulian@gmail.com>
Thu, 22 Mar 2018 22:29:48 +0000 (23:29 +0100)
Steps to reproduce were:
* Open Blender (no need for factory settings, "Promt Quit" needs to be enabled)
* Edit the file (e.g. translate some object)
* Quit Blender but don't skip quit promt
* Press "Save & Quit"
* Save the file

Not sure if Windows supports the "Save & Quit" behavior, so this may not have
applied to Windows.

source/blender/windowmanager/intern/wm_files.c

index 551b17302feee9ef0c24c4025415b3550c65ccb1..7df6deaecf6f207102c0ce4e742db446260de476 100644 (file)
@@ -2076,7 +2076,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
        WM_event_add_notifier(C, NC_WM | ND_FILESAVE, NULL);
 
        if (RNA_boolean_get(op->ptr, "exit")) {
-               WM_exit(C);
+               wm_exit_schedule_delayed(C);
        }
 
        return OPERATOR_FINISHED;