[PD-cvs] SF.net SVN: pure-data: [10039] branches/pd-extended/v0-40/pd/src/import.c
eighthave at users.sourceforge.net
eighthave at users.sourceforge.net
Thu Jun 19 01:01:09 CEST 2008
Revision: 10039
http://pure-data.svn.sourceforge.net/pure-data/?rev=10039&view=rev
Author: eighthave
Date: 2008-06-18 16:01:04 -0700 (Wed, 18 Jun 2008)
Log Message:
-----------
fixed crasher bug related to reusing loaded_libs after calling namelist_free() on it
Modified Paths:
--------------
branches/pd-extended/v0-40/pd/src/import.c
Modified: branches/pd-extended/v0-40/pd/src/import.c
===================================================================
--- branches/pd-extended/v0-40/pd/src/import.c 2008-06-18 22:58:18 UTC (rev 10038)
+++ branches/pd-extended/v0-40/pd/src/import.c 2008-06-18 23:01:04 UTC (rev 10039)
@@ -47,7 +47,6 @@
{
t_object x_obj;
t_canvas *x_canvas;
- t_namelist *x_top;
t_namelist *x_current;
char x_classpath_root[FILENAME_MAX];
t_outlet *x_data_outlet;
@@ -147,10 +146,14 @@
static void import_free(t_import *x)
{
import_instance_count--;
+/* TODO perhaps loaded_libs should be an instance variable */
if(import_instance_count == 0)
{
- namelist_free(loaded_libs);
- loaded_libs = NULL;
+ if(loaded_libs)
+ {
+ namelist_free(loaded_libs);
+ loaded_libs = NULL;
+ }
}
/* TODO: perhaps this should remove any libs that this instance had added to
* the namespace */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Pd-cvs
mailing list