Skip to content

Commit fb92258

Browse files
author
jef
committed
fix crash
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15160 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b9aaa49 commit fb92258

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/core/qgsprojectproperty.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,15 @@ QgsPropertyKey::~QgsPropertyKey()
281281

282282
QVariant QgsPropertyKey::value() const
283283
{
284-
QgsProperty * foundQgsProperty;
284+
QgsProperty *foundQgsProperty = mProperties.value( name() );
285285

286-
if ( 0 == ( foundQgsProperty = mProperties.value( name() ) ) )
287-
{ // recurse down to next key
288-
return foundQgsProperty->value();
289-
}
290-
else
286+
if ( !foundQgsProperty )
291287
{
292288
QgsDebugMsg( "key has null child" );
293-
294289
return QVariant(); // just return an QVariant::Invalid
295290
}
291+
292+
return foundQgsProperty->value();
296293
} // QVariant QgsPropertyKey::value()
297294

298295

0 commit comments

Comments
 (0)