Fix T74182: Crash saving images from non-image spaces
This commit is contained in:
parent
727d430811
commit
096936fe1d
Notes:
blender-bot
2023-02-14 02:43:21 +01:00
Referenced by issue #74274, Blender 2.82a proposed revisions Referenced by issue #74182, Blender crashes by saving a painted texture in properties/texture properties
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue