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

This commit is contained in:
wmayer
2021-03-28 13:40:35 +02:00
parent aedd1f96e4
commit e239684102
@@ -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);