Skip to content

Commit 721cc0f

Browse files
author
jef
committedFeb 12, 2011
fix crash
git-svn-id: http://svn.osgeo.org/qgis/trunk@15160 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent dd23dde commit 721cc0f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed
 

‎src/core/qgsprojectproperty.cpp

Lines changed: 4 additions & 7 deletions
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)
Please sign in to comment.