[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50955] trunk/blender/source/blender/ editors: fix for crash drawing the clip view with a blend file that has lock to selected , but no clip in the view.

Campbell Barton ideasman42 at gmail.com
Sun Sep 30 12:39:00 CEST 2012


Revision: 50955
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50955
Author:   campbellbarton
Date:     2012-09-30 10:39:00 +0000 (Sun, 30 Sep 2012)
Log Message:
-----------
fix for crash drawing the clip view with a blend file that has lock to selected, but no clip in the view.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_clip/clip_editor.c
    trunk/blender/source/blender/editors/space_image/image_ops.c

Modified: trunk/blender/source/blender/editors/space_clip/clip_editor.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/clip_editor.c	2012-09-30 10:38:12 UTC (rev 50954)
+++ trunk/blender/source/blender/editors/space_clip/clip_editor.c	2012-09-30 10:39:00 UTC (rev 50955)
@@ -368,7 +368,7 @@
 
 	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))

Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c	2012-09-30 10:38:12 UTC (rev 50954)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c	2012-09-30 10:39:00 UTC (rev 50955)
@@ -1432,7 +1432,7 @@
 			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;
 			}




More information about the Bf-blender-cvs mailing list