diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-07 07:10:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-07 07:10:37 +0300 |
commit | adf961a46cea7d3d7d6a3caf05a74f560201aa2e (patch) | |
tree | 0dedf06ed051c7ea9ceb6cb074f1bb4babae5826 /source/blender/editors/interface/interface_icons.c | |
parent | e14247d0797bc202f6be6d25615a47a415c2b45d (diff) |
fix [#25520] crash when closing the properties panel in uv/image editor
don't draw the image if the size is 0.
Crash was actually an assert() so debug builds only, replace assert() with BKE_assert() so crash is opt in build option.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index b0ab90279f8..f8aa335b929 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -28,7 +28,6 @@ #include <math.h> #include <stdlib.h> #include <string.h> -#include <assert.h> #ifndef WIN32 #include <unistd.h> @@ -851,7 +850,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), /* sanity check */ if(w<=0 || h<=0 || w>2000 || h>2000) { printf("icon_draw_rect: icons are %i x %i pixels?\n", w, h); - assert(!"invalid icon size"); + BKE_assert(!"invalid icon size"); return; } |