summaryrefslogtreecommitdiff
path: root/vcl/source/window/dialog.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/dialog.cxx')
-rw-r--r--vcl/source/window/dialog.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 74462fc1c7c5..54d12e8945db 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1067,10 +1067,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