[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28403] trunk/blender/source/blender/ blenloader/intern/readfile.c: fix for crash reading console history.

Campbell Barton ideasman42 at gmail.com
Sat Apr 24 23:14:05 CEST 2010


Revision: 28403
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28403
Author:   campbellbarton
Date:     2010-04-24 23:14:05 +0200 (Sat, 24 Apr 2010)

Log Message:
-----------
fix for crash reading console history.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2010-04-24 19:36:29 UTC (rev 28402)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2010-04-24 21:14:05 UTC (rev 28403)
@@ -5169,7 +5169,7 @@
 			}
 			else if(sl->spacetype==SPACE_CONSOLE) {
 				SpaceConsole *sconsole= (SpaceConsole *)sl;
-				ConsoleLine *cl, *clnext;
+				ConsoleLine *cl, *cl_next;
 				
 				link_list(fd, &sconsole->scrollback);
 				link_list(fd, &sconsole->history);
@@ -5180,9 +5180,10 @@
 				/*comma expressions, (e.g. expr1, expr2, expr3) evalutate each expression,
 				  from left to right.  the right-most expression sets the result of the comma
 				  expression as a whole*/
-				for(cl= sconsole->history.first; cl && (clnext=cl->next); cl= clnext) {
+				for(cl= sconsole->history.first; cl; cl= cl_next) {
+					cl_next= cl->next;
 					cl->line= newdataadr(fd, cl->line);
-					if (!cl->line) {
+					if (cl->line == NULL) {
 						BLI_remlink(&sconsole->history, cl);
 						MEM_freeN(cl);
 					}





More information about the Bf-blender-cvs mailing list