Revision: 7359
http://playerstage.svn.sourceforge.net/playerstage/?rev=7359&view=rev
Author: thjc
Date: 2009-03-02 02:06:19 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
Applied patch to move indicator figure construction to setup method, fixes
segfault when unsubscribing the second time
Modified Paths:
--------------
code/stage/branches/release-2-1-patches/src/model_indicator.c
Modified: code/stage/branches/release-2-1-patches/src/model_indicator.c
===================================================================
--- code/stage/branches/release-2-1-patches/src/model_indicator.c
2009-02-25 23:18:33 UTC (rev 7358)
+++ code/stage/branches/release-2-1-patches/src/model_indicator.c
2009-03-02 02:06:19 UTC (rev 7359)
@@ -65,21 +65,7 @@
void indicator_load( stg_model_t* mod )
{
- stg_indicator_config_t* cfg = (stg_indicator_config_t*)mod->cfg;
- // Take a copy of the polygon
- stg_indicator_data_t data;
- data.numPolys = mod->polygons_count;
- data.polys = indicator_copy_polygons( mod->polygons, data.numPolys );
-
- // Set the indicator to off initially
- data.on = FALSE;
- stg_model_set_polygons( mod, NULL, 0 );
-
- // Store the updated data (includes copy of polygon and original state)
- stg_model_set_data( mod, &data, sizeof(data) );
-
- model_change( mod, &mod->cfg ); // Notify model has been changed.
}
int indicator_update( stg_model_t* mod );
@@ -214,7 +200,23 @@
// install the update function
mod->f_update = indicator_update;
+
+ stg_indicator_config_t* cfg = (stg_indicator_config_t*)mod->cfg;
+ // Take a copy of the polygon
+ stg_indicator_data_t data;
+ data.numPolys = mod->polygons_count;
+ data.polys = indicator_copy_polygons( mod->polygons, data.numPolys );
+
+ // Set the indicator to off initially
+ data.on = FALSE;
+ stg_model_set_polygons( mod, NULL, 0 );
+
+ // Store the updated data (includes copy of polygon and original state)
+ stg_model_set_data( mod, &data, sizeof(data) );
+
+ model_change( mod, &mod->cfg ); // Notify model has been changed.
+
return 0; // ok
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit