Fix T67016: crash drawing image editor without image

This commit is contained in:
Brecht Van Lommel
2019-07-15 22:20:51 +02:00
parent d061154b93
commit 8faaeef5fb

View File

@@ -798,7 +798,9 @@ void draw_image_main(const bContext *C, ARegion *ar)
ED_space_image_get_zoom(sima, ar, &zoomx, &zoomy);
/* Tag image as in active use for garbage collector. */
BKE_image_tag_time(ima);
if (ima) {
BKE_image_tag_time(ima);
}
show_viewer = (ima && ima->source == IMA_SRC_VIEWER) != 0;
show_render = (show_viewer && ima->type == IMA_TYPE_R_RESULT) != 0;