File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,8 @@ void TestQgsOgcUtils::testExpressionToOgcFilterWFS11_data()
432
432
static QString normalizeXML ( const QString& xmlText )
433
433
{
434
434
QDomDocument doc;
435
- doc.setContent ( xmlText, true );
435
+ if ( !doc.setContent ( xmlText, true ) )
436
+ return QString ();
436
437
return doc.toString ( -1 );
437
438
}
438
439
Original file line number Diff line number Diff line change @@ -117,7 +117,10 @@ void TestQgsGdalProvider::noData()
117
117
QVERIFY ( provider->isValid () );
118
118
QgsRasterDataProvider* rp = dynamic_cast < QgsRasterDataProvider* >( provider );
119
119
QVERIFY ( rp );
120
- QCOMPARE ( rp->srcNoDataValue ( 1 ), static_cast <double >( 255 ) );
120
+ if ( rp )
121
+ {
122
+ QCOMPARE ( rp->srcNoDataValue ( 1 ), static_cast <double >( 255 ) );
123
+ }
121
124
delete provider;
122
125
}
123
126
@@ -128,7 +131,10 @@ void TestQgsGdalProvider::invalidNoDataInSourceIgnored()
128
131
QVERIFY ( provider->isValid () );
129
132
QgsRasterDataProvider* rp = dynamic_cast < QgsRasterDataProvider* >( provider );
130
133
QVERIFY ( rp );
131
- QCOMPARE ( rp->srcHasNoDataValue ( 1 ), false );
134
+ if ( rp )
135
+ {
136
+ QCOMPARE ( rp->srcHasNoDataValue ( 1 ), false );
137
+ }
132
138
delete provider;
133
139
}
134
140
You can’t perform that action at this time.
0 commit comments