Skip to content

Commit

Permalink
TD: fixes #4598: Segfault when deleting template without page
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Mar 27, 2021
1 parent e825148 commit 5e73e71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mod/TechDraw/Gui/ViewProviderTemplate.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 5e73e71

Please sign in to comment.