[Bf-blender-cvs] [5c490d43774] master: Fix T74221 Crash when changing Image Source in UV editor

Clément Foucault noreply at git.blender.org
Wed Feb 26 15:33:55 CET 2020


Commit: 5c490d437743a2e5b8e47620df32199ce8b7a3b0
Author: Clément Foucault
Date:   Wed Feb 26 15:33:44 2020 +0100
Branches: master
https://developer.blender.org/rB5c490d437743a2e5b8e47620df32199ce8b7a3b0

Fix T74221 Crash when changing Image Source in UV editor

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

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 f4688ce17fd..54bd2f37f3a 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -985,7 +985,7 @@ void uiTemplateImage(uiLayout *layout,
           void *lock;
           ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock);
 
-          if (ibuf->rect_float && (ibuf->flags & IB_halffloat) == 0) {
+          if (ibuf && ibuf->rect_float && (ibuf->flags & IB_halffloat) == 0) {
             uiItemR(col, &imaptr, "use_half_precision", 0, NULL, ICON_NONE);
           }
           BKE_image_release_ibuf(ima, ibuf, lock);



More information about the Bf-blender-cvs mailing list