fix for crash drawing the clip view with a blend file that has lock to selected,...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 30 Sep 2012 10:39:00 +0000 (10:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 30 Sep 2012 10:39:00 +0000 (10:39 +0000)
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_image/image_ops.c

index 32f91671dafcd6a78e93034713d82137efbc3cd6..167353e7cb794bfc4af878b6607bf6e43e26a58a 100644 (file)
@@ -368,7 +368,7 @@ int ED_clip_view_selection(const bContext *C, ARegion *ar, int fit)
 
        ED_space_clip_get_size(sc, &frame_width, &frame_height);
 
-       if (frame_width == 0 || frame_height == 0)
+       if ((frame_width == 0) || (frame_height == 0) || (sc->clip == NULL))
                return FALSE;
 
        if (!selected_boundbox(sc, min, max))
index e617daf6cf718962fb63143ef79d4baa1410c779..4f57b2249d1d0ec71c4a94d85be1675144620be8 100644 (file)
@@ -1432,7 +1432,7 @@ static int image_save_as_poll(bContext *C)
                        SpaceImage *sima = CTX_wm_space_image(C);
                        Image *ima = ED_space_image(sima);
 
-                       if ((ima->source == IMA_SRC_VIEWER)) {
+                       if (ima->source == IMA_SRC_VIEWER) {
                                CTX_wm_operator_poll_msg_set(C, "can't save image while rendering");
                                return FALSE;
                        }