diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index f13aaf8c6246..43fc7557e7e2 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -369,6 +369,7 @@ void SmEditWindow::Command(const CommandEvent& rCEvt) xPopupMenu->SetSelectHdl(LINK(this, SmEditWindow, MenuSelectHdl)); xPopupMenu->Execute( this, aPoint ); + xPopupMenu.disposeAndClear(); bForwardEvt = false; } else if (rCEvt.GetCommand() == CommandEventId::Wheel)