summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-22 09:59:11 +0200
committerNoel Grandin <noel@peralex.com>2015-05-22 09:59:46 +0200
commit24600dcf3118cb01d57c31518d36be870f73e79c (patch)
treea52948f34190ca54071d7d457b91471fb1703ad7 /vcl/source
parent83eb114394879cbfd073322a51c47d02553c1fcf (diff)
loplugin:constantfunction
Change-Id: I7cb5b0c2cf9ade557173ca596ea5d42d853ff448
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;
}