[Libreoffice-commits] core.git: vcl/source

Miklos Vajna vmiklos at collabora.co.uk
Tue May 19 03:39:44 PDT 2015


 vcl/source/control/edit.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 339cfd98124cd3f6db697d5ec57fa687c7d99db6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue May 19 12:21:07 2015 +0200

    vcl: handle NULL pCursor in Edit::ImplShowCursor()
    
    I saw this happening on Writer shutdown.
    
    Change-Id: Ib357d070f53ce0728a5b89f895b87fc42628834c

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 9449e49..f69b268 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1197,9 +1197,12 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
 
     const long nTextHeight = GetTextHeight();
     const long nCursorPosY = ImplGetTextYPosition();
-    pCursor->SetPos( Point( nCursorPosX, nCursorPosY ) );
-    pCursor->SetSize( Size( nCursorWidth, nTextHeight ) );
-    pCursor->Show();
+    if (pCursor)
+    {
+        pCursor->SetPos( Point( nCursorPosX, nCursorPosY ) );
+        pCursor->SetSize( Size( nCursorWidth, nTextHeight ) );
+        pCursor->Show();
+    }
 }
 
 void Edit::ImplAlign()


More information about the Libreoffice-commits mailing list