[QGIS Commit] r15160 - trunk/qgis/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Feb 12 11:28:08 EST 2011
Author: jef
Date: 2011-02-12 08:28:08 -0800 (Sat, 12 Feb 2011)
New Revision: 15160
Modified:
trunk/qgis/src/core/qgsprojectproperty.cpp
Log:
fix crash
Modified: trunk/qgis/src/core/qgsprojectproperty.cpp
===================================================================
--- trunk/qgis/src/core/qgsprojectproperty.cpp 2011-02-12 13:50:57 UTC (rev 15159)
+++ trunk/qgis/src/core/qgsprojectproperty.cpp 2011-02-12 16:28:08 UTC (rev 15160)
@@ -281,18 +281,15 @@
QVariant QgsPropertyKey::value() const
{
- QgsProperty * foundQgsProperty;
+ QgsProperty *foundQgsProperty = mProperties.value( name() );
- if ( 0 == ( foundQgsProperty = mProperties.value( name() ) ) )
- { // recurse down to next key
- return foundQgsProperty->value();
- }
- else
+ if ( !foundQgsProperty )
{
QgsDebugMsg( "key has null child" );
-
return QVariant(); // just return an QVariant::Invalid
}
+
+ return foundQgsProperty->value();
} // QVariant QgsPropertyKey::value()
More information about the QGIS-commit
mailing list