]> git.saurik.com Git - wxWidgets.git/commitdiff
Workaround a crash bug; real solution as yet unknown
authorJulian Smart <julian@anthemion.co.uk>
Wed, 18 Jun 2003 07:41:24 +0000 (07:41 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 18 Jun 2003 07:41:24 +0000 (07:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/scintilla/src/Editor.cxx
src/stc/scintilla/src/Editor.cxx

index 44399a5fb0dc21aa57cae56a337f82e487323971..e6b7df0be15e857df1c9a92f50b2606537aba1cf 100644 (file)
@@ -1,6 +1,7 @@
 // Scintilla source code edit control
 /** @file Editor.cxx
  ** Main code for the edit control.
+       Last change:  JS   18 Jun 103    1:08 am
  **/
 // Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
 // The License.txt file describes the conditions under which this software may be distributed.
@@ -2353,6 +2354,11 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
                }
        }
 
+        // Workaround by JACS: sometimes due to a re-entry condition,
+        // pixmapLine becomes uninitialised, followed by a crash.
+        if (!pixmapLine->Initialised())
+                return;
+
        PRectangle rcRightMargin = rcClient;
        rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth;
        if (rcArea.Intersects(rcRightMargin)) {
index 44399a5fb0dc21aa57cae56a337f82e487323971..e6b7df0be15e857df1c9a92f50b2606537aba1cf 100644 (file)
@@ -1,6 +1,7 @@
 // Scintilla source code edit control
 /** @file Editor.cxx
  ** Main code for the edit control.
+       Last change:  JS   18 Jun 103    1:08 am
  **/
 // Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
 // The License.txt file describes the conditions under which this software may be distributed.
@@ -2353,6 +2354,11 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
                }
        }
 
+        // Workaround by JACS: sometimes due to a re-entry condition,
+        // pixmapLine becomes uninitialised, followed by a crash.
+        if (!pixmapLine->Initialised())
+                return;
+
        PRectangle rcRightMargin = rcClient;
        rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth;
        if (rcArea.Intersects(rcRightMargin)) {