summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/dialog/templdlg.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index df4b45db01..df4b8bfecb 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1731,6 +1731,7 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
pItems, nModi );
+ // FIXME: Dialog can be destroyed while in Execute() check stack variable for dtor flag!
if ( !pItem || aDeleted() )
return FALSE;
@@ -1753,6 +1754,11 @@ BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
*pIdx = i;
}
}
+
+ // Reset destroyed flag otherwise we use the pointer in the dtor
+ // where the local stack object is already destroyed. This would
+ // overwrite objects on the stack!! See #i100110
+ pbDeleted = NULL;
return TRUE;
}