[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43583] trunk/blender/source/blender/nodes /intern/node_socket.c: Fix for missing NULL check in socket default_value free function.

Lukas Toenne lukas.toenne at googlemail.com
Sat Jan 21 17:36:15 CET 2012


Revision: 43583
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43583
Author:   lukastoenne
Date:     2012-01-21 16:36:06 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
Fix for missing NULL check in socket default_value free function. Some sockets (currently only cycles shader sockets) don't actually have a default_value pointer.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/node_socket.c

Modified: trunk/blender/source/blender/nodes/intern/node_socket.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/node_socket.c	2012-01-21 14:54:53 UTC (rev 43582)
+++ trunk/blender/source/blender/nodes/intern/node_socket.c	2012-01-21 16:36:06 UTC (rev 43583)
@@ -190,7 +190,8 @@
 void node_socket_free_default_value(int UNUSED(type), void *default_value)
 {
 	/* XXX can just free the pointee for all current socket types. */
-	MEM_freeN(default_value);
+	if (default_value)
+		MEM_freeN(default_value);
 }
 
 void node_socket_init_default_value(int type, void *default_value)



More information about the Bf-blender-cvs mailing list