diff options
| author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-26 22:09:09 +0100 |
|---|---|---|
| committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-11-27 08:49:11 +0100 |
| commit | 246baac818f682b7021e13017f943ae476ac74d4 (patch) | |
| tree | e221dd088c7e7f31b092e7e94a7534bd01281b5e /starmath | |
| parent | 5259a08e951858cc32bb529e63e3a2fe5837540a (diff) | |
starmath: fix deref nullptr
Change-Id: I84ad6d24d850857949bbae403cb6f640cd31b16e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177374
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'starmath')
| -rw-r--r-- | starmath/source/view.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index da074984964d..ac6c90d78747 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1860,8 +1860,8 @@ void SmViewShell::Execute(SfxRequest& rReq) if (xQuery->run() == RET_NO) break; } - SmEditWindow* pEditWin = GetEditWindow(); - SmModule::get()->GetConfig()->SaveUserDefinedFormula(aName, pEditWin->GetText()); + if (SmEditWindow* pEditWin = GetEditWindow()) + SmModule::get()->GetConfig()->SaveUserDefinedFormula(aName, pEditWin->GetText()); // Show the Elements sidebar with the "User-defined" entry selected GetViewFrame().ShowChildWindow(SID_SIDEBAR); |
