sw/source/ui/index/swuiidxmrk.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d77c88b1e329d596bb3bf861c28e4b5e9a44069a
Author:     Jim Raykowski <[email protected]>
AuthorDate: Tue Nov 25 15:33:40 2025 -0900
Commit:     Xisco Fauli <[email protected]>
CommitDate: Fri Nov 28 21:08:13 2025 +0100

    Fix assert in ShowWarning4Modifications
    
    Select some document text, Menu > Insert > Table of Contents and
    Index..., press Close, press Yes or No or X in the query dialog.
    
    results:
    
    vclptr.hxx:123: VclPtr<reference_type>::~VclPtr() [with reference_type
    = AbstractQueryDialog]: Assertion `(!m_rInnerRef.get() || m_rInnerRef-
    >isDisposed() || m_rInnerRef->getRefCount() > 1) && "someone forgot to
    call dispose()"' failed.
    
    stack:
    
    8  VclPtr<AbstractQueryDialog>::~VclPtr vclptr.hxx 123
    9  SwIndexMarkPane::ShowWarning4Modifications swuiidxmrk.cxx 763
    10 SwIndexMarkPane::CloseHdl swuiidxmrk.cxx 710
    
    Change-Id: I3b651fdd01a2e12c747540b48af0ec389d00dbf6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194536
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <[email protected]>
    (cherry picked from commit 7b30a180fb529d546b7f70e3bf4abc271371c81f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194758
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/source/ui/index/swuiidxmrk.cxx 
b/sw/source/ui/index/swuiidxmrk.cxx
index 22bdbf87f2c2..ca864b5fbdd4 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -754,9 +754,9 @@ short SwIndexMarkPane::ShowWarning4Modifications()
 {
     short nresult = RET_NO;
     VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
-    auto pDlg = pFact->CreateQueryDialog(
-        m_xDialog.get(), SwResId(STR_QUERY_CLOSE_TITLE),
-        SwResId(STR_QUERY_CLOSE_TEXT), SwResId(STR_QUERY_CLOSE_QUESTION), 
false);
+    ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateQueryDialog(
+        m_xDialog.get(), SwResId(STR_QUERY_CLOSE_TITLE), 
SwResId(STR_QUERY_CLOSE_TEXT),
+        SwResId(STR_QUERY_CLOSE_QUESTION), false));
     nresult = pDlg->Execute();
 
     return nresult;

Reply via email to