[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56611] trunk/blender/source/blender/ blenloader/intern/readfile.c: Fix for do_versions bug with node groups: The special case of direct input-to-output connections was not handled correctly .

Lukas Toenne lukas.toenne at googlemail.com
Thu May 9 10:30:00 CEST 2013


Revision: 56611
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56611
Author:   lukastoenne
Date:     2013-05-09 08:29:59 +0000 (Thu, 09 May 2013)
Log Message:
-----------
Fix for do_versions bug with node groups: The special case of direct input-to-output connections was not handled correctly. In this case both the tonode and fromnode pointers in old node groups are NULL.

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	2013-05-09 08:05:02 UTC (rev 56610)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2013-05-09 08:29:59 UTC (rev 56611)
@@ -2526,9 +2526,11 @@
 							link->fromsock = node_group_input_find_socket(input_node, link->fromsock->identifier);
 							++num_inputs;
 							
-							if (input_locx > link->tonode->locx - offsetx)
-								input_locx = link->tonode->locx - offsetx;
-							input_locy += link->tonode->locy;
+							if (link->tonode) {
+								if (input_locx > link->tonode->locx - offsetx)
+									input_locx = link->tonode->locx - offsetx;
+								input_locy += link->tonode->locy;
+							}
 						}
 						else
 							free_link = TRUE;
@@ -2540,9 +2542,11 @@
 							link->tosock = node_group_output_find_socket(output_node, link->tosock->identifier);
 							++num_outputs;
 							
-							if (output_locx < link->fromnode->locx + offsetx)
-								output_locx = link->fromnode->locx + offsetx;
-							output_locy += link->fromnode->locy;
+							if (link->fromnode) {
+								if (output_locx < link->fromnode->locx + offsetx)
+									output_locx = link->fromnode->locx + offsetx;
+								output_locy += link->fromnode->locy;
+							}
 						}
 						else
 							free_link = TRUE;




More information about the Bf-blender-cvs mailing list