Skip to content

Commit 39a1fab

Browse files
committed
Fixes segmentation fault
1 parent 91a229b commit 39a1fab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/qgsogcutils.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,10 @@ QDomElement QgsOgcUtils::expressionToOgcExpression( const QgsExpression &exp,
21912191
break;
21922192
}
21932193
default:
2194-
*errorMessage = QObject::tr( "Node type not supported in expression translation: %1" ).arg( node->nodeType() );
2194+
{
2195+
if ( errorMessage )
2196+
*errorMessage = QObject::tr( "Node type not supported in expression translation: %1" ).arg( node->nodeType() );
2197+
}
21952198
}
21962199
// got an error
21972200
return QDomElement();

0 commit comments

Comments
 (0)