[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48288] trunk/blender/source/blender/ editors: Fixed crash when trying to perform transformation in Clip Editor without clip opened

Sergey Sharybin sergey.vfx at gmail.com
Mon Jun 25 21:48:05 CEST 2012


Revision: 48288
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48288
Author:   nazgul
Date:     2012-06-25 19:48:05 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
Fixed crash when trying to perform transformation in Clip Editor without clip opened

Reported by JumboCoDeC in IRC. Thanks for the report.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_clip/clip_editor.c
    trunk/blender/source/blender/editors/transform/transform_conversions.c

Modified: trunk/blender/source/blender/editors/space_clip/clip_editor.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/clip_editor.c	2012-06-25 19:42:10 UTC (rev 48287)
+++ trunk/blender/source/blender/editors/space_clip/clip_editor.c	2012-06-25 19:48:05 UTC (rev 48288)
@@ -177,6 +177,13 @@
 	 * mainly this is sued for transformation stuff
 	 */
 
+	if (!sc->clip) {
+		*aspx = 1.0f;
+		*aspy = 1.0f;
+
+		return;
+	}
+
 	ED_space_clip_get_aspect(sc, aspx, aspy);
 	BKE_movieclip_get_size(sc->clip, &sc->user, &w, &h);
 

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c	2012-06-25 19:42:10 UTC (rev 48287)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c	2012-06-25 19:48:05 UTC (rev 48288)
@@ -5913,9 +5913,12 @@
 
 	t->total = 0;
 
+	if (!clip)
+		return;
+
 	BKE_movieclip_get_size(clip, &sc->user, &width, &height);
 
-	if (!clip || width == 0 || height == 0)
+	if (width == 0 || height == 0)
 		return;
 
 	if (ar->regiontype == RGN_TYPE_PREVIEW) {




More information about the Bf-blender-cvs mailing list