diff options
Diffstat (limited to 'vcl/source/window/dialog.cxx')
-rw-r--r-- | vcl/source/window/dialog.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 842c17dfcfbe..b707a72a8997 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1066,10 +1066,20 @@ short Dialog::Execute() OSL_FAIL( "Dialog::Execute() - Dialog destroyed in Execute()" ); } - tools::Long nRet = mpDialogImpl->mnResult; - mpDialogImpl->mnResult = -1; + assert(mpDialogImpl); - return static_cast<short>(nRet); + if (mpDialogImpl) + { + tools::Long nRet = mpDialogImpl->mnResult; + mpDialogImpl->mnResult = -1; + + return static_cast<short>(nRet); + } + else + { + SAL_WARN( "vcl", "Dialog::Execute() : missing mpDialogImpl " ); + return 0; + } } // virtual |