TD: fixes #0004598: Segfault when deleting template without page

This commit is contained in:
wmayer
2021-03-27 13:18:15 +01:00
parent 7eaf08063e
commit 3737a3cfb2

View File

@@ -191,6 +191,10 @@ bool ViewProviderTemplate::onDelete(const std::vector<std::string> &)
// get the page
auto page = getTemplate()->getParentPage();
// If no parent page is given then just go ahead
if (!page)
return true;
// generate dialog
QString bodyMessage;
QTextStream bodyMessageStream(&bodyMessage);