https://bugs.documentfoundation.org/show_bug.cgi?id=163543

            Bug ID: 163543
           Summary: File crash in LibreOffice Writer when selecting and
                    copying content
           Product: LibreOffice
           Version: 24.8.2.1 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Description:
The file crashes when copying the selected document fragment not from the
beginning of the line with the transition to the next paragraph, if was open
the "Accessibility check" tab.

It looks like the problem is in lines like this:
SwWrtShell* pWrtShell = rDocument.GetDocShell()->GetWrtShell();

In the problematic case, rDocument.GetDocShell() returns nullptr, which causes
the program to crash when calling GetWrtShell(). Perhaps the code needs an
additional check for nullptr, as is done here, a little lower:

SwDocShell* pShell = pDoc->GetDocShell();
  if (!pShell)
    return;

Steps to Reproduce:
1. Open the file.odt or .docx
2. Open the "Accessibility check" tab
3. Select several paragraphs of the text, starting not from the beginning of
the line
4. Try to copy the selected text

Actual Results:
The file is crashing

Expected Results:
The text is being copied


Reproducible: Always


User Profile Reset: No

Additional Info:
Previously, we wrote in the related PR: Bug tdf#162889, but decided to create a
new one, because there is no promotion.

First repro on master:
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 245a20b6093237fc247f9515e37dc70556448812
CPU threads: 12; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to