Fix possible crash when checking for available undo/redo
This commit is contained in:
@@ -681,10 +681,14 @@ bool View3DInventor::onHasMsg(const char* pMsg) const
|
||||
return true;
|
||||
else if (strcmp("SaveAs",pMsg) == 0)
|
||||
return true;
|
||||
else if (strcmp("Undo",pMsg) == 0)
|
||||
return getAppDocument()->getAvailableUndos() > 0;
|
||||
else if (strcmp("Redo",pMsg) == 0)
|
||||
return getAppDocument()->getAvailableRedos() > 0;
|
||||
else if (strcmp("Undo",pMsg) == 0) {
|
||||
App::Document* doc = getAppDocument();
|
||||
return doc && doc->getAvailableUndos() > 0;
|
||||
}
|
||||
else if (strcmp("Redo",pMsg) == 0) {
|
||||
App::Document* doc = getAppDocument();
|
||||
return doc && doc->getAvailableRedos() > 0;
|
||||
}
|
||||
else if (strcmp("Print",pMsg) == 0)
|
||||
return true;
|
||||
else if (strcmp("PrintPreview",pMsg) == 0)
|
||||
|
||||
Reference in New Issue
Block a user