Merge pull request #4121 from everlanes/TechDraw_Segfault
[TD] Check return value of getMDIViewPage() a second time
This commit is contained in:
@@ -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?");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user