[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47450] trunk/blender/source/blender/ blenloader/intern/readfile.c: Fix #31706, Crash loading old file in trunk build.

Lukas Toenne lukas.toenne at googlemail.com
Tue Jun 5 10:06:32 CEST 2012


Revision: 47450
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47450
Author:   lukastoenne
Date:     2012-06-05 08:06:15 +0000 (Tue, 05 Jun 2012)
Log Message:
-----------
Fix #31706, Crash loading old file in trunk build.

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	2012-06-05 07:01:43 UTC (rev 47449)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2012-06-05 08:06:15 UTC (rev 47450)
@@ -6724,6 +6724,11 @@
 			char basepath[FILE_MAXDIR];
 			char filename[FILE_MAXFILE];
 			
+			/* ugly, need to remove the old inputs list to avoid bad pointer checks when adding new sockets.
+			 * sock->storage is expected to contain path info in ntreeCompositOutputFileAddSocket.
+			 */
+			node->inputs.first = node->inputs.last = NULL;
+			
 			node->storage = nimf;
 			
 			/* split off filename from the old path, to be used as socket sub-path */




More information about the Bf-blender-cvs mailing list