basctl/source/basicide/baside2b.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit be464eaa4e443e81ee236044b37cd8a861fa4d17
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Jan 25 08:46:52 2024 +0000
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Jan 25 11:23:02 2024 +0100

    Resolves: tdf#159368 crash on tools, macros, edit
    
    when launched from startcenter
    
    Change-Id: I362bfe27914445c3027b6e8a125a75cc31679678
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162542
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 0cb13161178b..33cbbc4787ff 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1252,9 +1252,12 @@ void EditorWindow::ChangeFontColor( Color aColor )
 
 void EditorWindow::UpdateSyntaxHighlighting ()
 {
-    const sal_uInt32 nCount = pEditEngine->GetParagraphCount();
-    for (sal_uInt32 i = 0; i < nCount; ++i)
-        DoDelayedSyntaxHighlight(i);
+    if (pEditEngine)
+    {
+        const sal_uInt32 nCount = pEditEngine->GetParagraphCount();
+        for (sal_uInt32 i = 0; i < nCount; ++i)
+            DoDelayedSyntaxHighlight(i);
+    }
 }
 
 void EditorWindow::ImplSetFont()

Reply via email to