Fix T67334: Blender does not exit after saving
authorJacques Lucke <mail@jlucke.com>
Tue, 23 Jul 2019 12:32:32 +0000 (14:32 +0200)
committerJacques Lucke <mail@jlucke.com>
Tue, 23 Jul 2019 12:32:32 +0000 (14:32 +0200)
source/blender/windowmanager/intern/wm_files.c

index 48b09b0d3292d1bb930b26557a421190e3dea318..fd3e7a2d3fce310c027239ba2949e25785d67c05 100644 (file)
@@ -2956,7 +2956,8 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat
   wmWindow *win = CTX_wm_window(C);
   UI_popup_block_close(C, win, arg_block);
 
-  if (save_images_when_file_is_closed) {
+  int modified_images_count = ED_image_save_all_modified_info(C, NULL);
+  if (modified_images_count > 0 && save_images_when_file_is_closed) {
     if (ED_image_should_save_modified(C)) {
       ReportList *reports = CTX_wm_reports(C);
       ED_image_save_all_modified(C, reports);