<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failed when adding/removing/adding text box to a shape"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=108867">bug 108867</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>mstahl@redhat.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failed when adding/removing/adding text box to a shape"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=108867#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion failed when adding/removing/adding text box to a shape"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=108867">bug 108867</a>
              from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
        <pre>After having added trace, we indeed go in "if" block quoted in my previous
comment but putting "m_rDoc.DelFrameFormat( pFormat );" outside else block
doesn't fix anything.

I tested this:
diff --git a/sw/source/core/doc/textboxhelper.cxx
b/sw/source/core/doc/textboxhelper.cxx
index 9a88ba9dea4e..c782128f1faa 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -123,7 +123,10 @@ void SwTextBoxHelper::destroy(SwFrameFormat* pShape)

         // Delete the associated TextFrame.
         if (pFormat)
+        {
            
pShape->GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat(pFormat);
+            pShape->SetOtherTextBoxFormat(nullptr);
+        }
     }
 }

I don't reproduce the crash but perhaps just hiding it.
Michael: any thoughts?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>