[Bf-blender-cvs] [f56c5416df0] blender-v2.82-release: Fix T74182: Crash saving images from non-image spaces

Campbell Barton noreply at git.blender.org
Mon Mar 9 20:56:35 CET 2020


Commit: f56c5416df05ae64ec0f43d69d59ba4f347cf111
Author: Campbell Barton
Date:   Tue Feb 25 16:59:57 2020 +1100
Branches: blender-v2.82-release
https://developer.blender.org/rBf56c5416df05ae64ec0f43d69d59ba4f347cf111

Fix T74182: Crash saving images from non-image spaces

===================================================================

M	source/blender/editors/space_image/image_buttons.c

===================================================================

diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 270fe0c59dc..454546cf34f 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -855,7 +855,7 @@ void uiTemplateImage(uiLayout *layout,
 
   /* Disable editing if image was modified, to avoid losing changes. */
   const bool is_dirty = BKE_image_is_dirty(ima);
-  if (is_dirty) {
+  if (is_dirty && CTX_wm_space_image(C)) {
     uiLayout *row = uiLayoutRow(layout, true);
     uiItemO(row, IFACE_("Save"), ICON_NONE, "image.save");
     uiItemO(row, IFACE_("Discard"), ICON_NONE, "image.reload");



More information about the Bf-blender-cvs mailing list