Skip to content

Commit aeb9d93

Browse files
committedOct 23, 2014
Fix QgsRasterInterface bindings again (fixes PyQgsRasterFileWriter test)
1 parent 691f4a2 commit aeb9d93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎python/core/raster/qgsrasterinterface.sip

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ class QgsRasterInterface
3131
else if (dynamic_cast<QgsHueSaturationFilter*>(sipCpp))
3232
sipClass = sipClass_QgsHueSaturationFilter;
3333
else if (dynamic_cast<QgsRasterDataProvider*>(sipCpp))
34+
{
3435
sipClass = sipClass_QgsRasterDataProvider;
36+
// use static cast because QgsRasterDataProvider has multiple inheritance
37+
// and we would end up with bad pointer otherwise!
38+
*sipCppRet = static_cast<QgsRasterDataProvider*>(sipCpp);
39+
}
3540
else if (dynamic_cast<QgsRasterNuller*>(sipCpp))
3641
sipClass = sipClass_QgsRasterNuller;
3742
else if (dynamic_cast<QgsRasterProjector*>(sipCpp))

0 commit comments

Comments
 (0)
Please sign in to comment.