Merge pull request #4121 from everlanes/TechDraw_Segfault

[TD] Check return value of getMDIViewPage() a second time
This commit is contained in:
Yorik van Havre
2020-12-14 12:43:28 +01:00
committed by GitHub

View File

@@ -193,7 +193,11 @@ private:
} else {
vpp->showMDIViewPage();
mdi = vpp->getMDIViewPage();
mdi->printPdf(filePath);
if (mdi) {
mdi->printPdf(filePath);
} else {
throw Py::TypeError("Page not available! Is it Hidden?");
}
}
}
}
@@ -234,7 +238,11 @@ private:
} else {
vpp->showMDIViewPage();
mdi = vpp->getMDIViewPage();
mdi->saveSVG(filePath);
if (mdi) {
mdi->saveSVG(filePath);
} else {
throw Py::TypeError("Page not available! Is it Hidden?");
}
}
}
}