Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-27 10:06:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-27 10:06:35 +0400
commitac0a8af41413b730c0ab17cf19390c65dee3134c (patch)
tree2dd171dae5a4d56b4eb68590808cb62ad8f1696d /source/blender/editors/space_image
parent9c6deff652d498501d7065e77cdbacfb6478c370 (diff)
fix [#35518] UV Mapping crashes the Blender with specific image file
2 bugs here - missing NULL check in IMB_colormanagement_display_settings_from_ctx() - deadlock in draw_image_paint_helpers() Simple solution is to not draw paint helpers for render/viewer images.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_draw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index ba12543ff50..23c85699b00 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -783,7 +783,7 @@ void draw_image_main(const bContext *C, ARegion *ar)
Image *ima;
ImBuf *ibuf;
float zoomx, zoomy;
- int show_viewer, show_render;
+ bool show_viewer, show_render, show_paint;
void *lock;
/* XXX can we do this in refresh? */
@@ -810,8 +810,9 @@ void draw_image_main(const bContext *C, ARegion *ar)
ima = ED_space_image(sima);
ED_space_image_get_zoom(sima, ar, &zoomx, &zoomy);
- show_viewer = (ima && ima->source == IMA_SRC_VIEWER);
- show_render = (show_viewer && ima->type == IMA_TYPE_R_RESULT);
+ show_viewer = (ima && ima->source == IMA_SRC_VIEWER) != 0;
+ show_render = (show_viewer && ima->type == IMA_TYPE_R_RESULT) != 0;
+ show_paint = (ima && (sima->mode == SI_MODE_PAINT) && (show_viewer == false) && (show_render == false));
if (show_viewer) {
/* use locked draw for drawing viewer image buffer since the compositor
@@ -835,7 +836,7 @@ void draw_image_main(const bContext *C, ARegion *ar)
draw_image_buffer(C, sima, ar, scene, ibuf, 0.0f, 0.0f, zoomx, zoomy);
/* paint helpers */
- if (sima->mode == SI_MODE_PAINT)
+ if (show_paint)
draw_image_paint_helpers(C, ar, scene, zoomx, zoomy);
/* XXX integrate this code */