summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/dialog.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index f4c81ad02eff..d76063938fe3 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -941,9 +941,11 @@ void Dialog::EndDialog( long nResult )
if ( mpDialogImpl->mbStartedModal )
{
ImplEndExecuteModal();
- mpDialogImpl->maEndDialogHdl.Call( this );
-
- mpDialogImpl->maEndDialogHdl = Link<>();
+ if (mpDialogImpl->maEndDialogHdl.IsSet())
+ {
+ mpDialogImpl->maEndDialogHdl.Call( this );
+ mpDialogImpl->maEndDialogHdl = Link<>();
+ }
mpDialogImpl->mbStartedModal = false;
mpDialogImpl->mnResult = -1;
}