Skip to content
Permalink
Browse files

[BACKPORT] Partially address https://bugzilla.redhat.com/show_bug.cgi…

…?id=712620 - don't assert when things go wrong. Still needs to give user some decent feedback somehow but at least it shouldnt crash QGIS
  • Loading branch information
timlinux committed Sep 24, 2011
1 parent 8c3e066 commit 0b1afb07d639a99a02499cafde5b80c0b003ee2b
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/plugins/georeferencer/qgsimagewarper.cpp
@@ -195,8 +195,12 @@ int QgsImageWarper::warpFile( const QString& input,
if ( destResY > 0.0 ) destResY = -destResY;

// Assert that the north-up convention is fullfiled by GDALSuggestedWarpOutput (should always be the case)
assert( adfGeoTransform[0] > 0.0 );
assert( adfGeoTransform[5] < 0.0 );
// Asserts are bad as they just crash out, changed to just return false. TS
if ( adfGeoTransform[0] <= 0.0 || adfGeoTransform[5] >= 0.0 )
{
QgsDebugMsg("Image is not north up after GDALSuggestedWarpOutput, bailing out.");
return false;
}
// Find suggested output image extent (in georeferenced units)
double minX = adfGeoTransform[0];
double maxX = adfGeoTransform[0] + adfGeoTransform[1] * destPixels;

0 comments on commit 0b1afb0

Please sign in to comment.
You can’t perform that action at this time.