We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b054e4 commit 380adbdCopy full SHA for 380adbd
src/composer/qgscomposition.cpp
@@ -568,7 +568,20 @@ void QgsComposition::paperSizeChanged ( void )
568
setOptions();
569
}
570
571
- recalculate();
+ try
572
+ {
573
+ recalculate();
574
+ }
575
+ catch (std::bad_alloc& ba)
576
577
+ // A better solution here would be to set the canvas back to the
578
+ // original size and carry on, but for the moment this will
579
+ // prevent a crash due to an uncaught exception.
580
+ QMessageBox::critical( 0, tr("Out of memory"),
581
+ tr("Qgis is unable to resize the paper size due to "
582
+ "insufficient memory.\n It is best that you avoid "
583
+ "using the map composer until you restart qgis.\n") );
584
585
586
mView->repaintContents();
587
writeSettings();
0 commit comments