[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18010] trunk/blender/source/blender/src/ edittime.c: Bugfix - Fixed crashes in Action Editor on Ctrl-L due to missing NULL checks .

Joshua Leung aligorith at gmail.com
Mon Dec 22 11:52:19 CET 2008


Revision: 18010
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18010
Author:   aligorith
Date:     2008-12-22 11:52:17 +0100 (Mon, 22 Dec 2008)

Log Message:
-----------
Bugfix - Fixed crashes in Action Editor on Ctrl-L due to missing NULL checks.

Modified Paths:
--------------
    trunk/blender/source/blender/src/edittime.c

Modified: trunk/blender/source/blender/src/edittime.c
===================================================================
--- trunk/blender/source/blender/src/edittime.c	2008-12-22 10:15:02 UTC (rev 18009)
+++ trunk/blender/source/blender/src/edittime.c	2008-12-22 10:52:17 UTC (rev 18010)
@@ -187,6 +187,9 @@
 	}
 	else
 		markers= &G.scene->markers;
+		
+	if (markers == NULL)
+		return;
 	
 	for (marker= markers->first; marker; marker= marker->next) {
 		if (marker->flag & SELECT) totmark++;
@@ -442,6 +445,11 @@
 	int selcount = 0;
 	
 	markers= &(G.scene->markers);
+	if (markers == NULL) {
+		*first = 0.0f;
+		*last = 0.0f;
+		return;
+	}
 	
 	if (sel)
 		for (marker= markers->first; marker; marker= marker->next) {
@@ -494,6 +502,10 @@
 	
 	getmouseco_areawin (mval);
 	
+	/* sanity checks */
+	if (markers == NULL)
+		return NULL;
+	
 	/* first clip selection in Y */
 	if ((clip_y) && (mval[1] > 30))
 		return NULL;





More information about the Bf-blender-cvs mailing list