Revision: 8273
http://playerstage.svn.sourceforge.net/playerstage/?rev=8273&view=rev
Author: rtv
Date: 2009-09-30 22:31:42 +0000 (Wed, 30 Sep 2009)
Log Message:
-----------
fixed lookup of missing properties [thanks jens]
Modified Paths:
--------------
code/stage/trunk/libstage/model_props.cc
Modified: code/stage/trunk/libstage/model_props.cc
===================================================================
--- code/stage/trunk/libstage/model_props.cc 2009-09-30 18:13:39 UTC (rev
8272)
+++ code/stage/trunk/libstage/model_props.cc 2009-09-30 22:31:42 UTC (rev
8273)
@@ -21,11 +21,15 @@
PRINT_WARN1( "Requested non-existent model core property
\"%s\"", key );
return NULL;
}
-
+
// otherwise it may be an arbitrary named property
- //return g_datalist_get_data( (GData**)&this->props, key ); // cast to
discard const
-
- return props.find(key)->second;
+ const std::map< std::string,const void* >::const_iterator& it
+ = props.find( key );
+
+ if( it != props.end() )
+ return it->second;
+ else
+ return NULL;
}
int Model::SetProperty( const char* key,
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit