[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [koffice] libs/kotext/changetracker: Fix null-pointer dereference.
From:       "Dr. Robert Marmorstein" <robert () narnia ! homeunix ! com>
Date:       2011-08-02 9:16:39
Message-ID: 20110802091639.89491A60D4 () git ! kde ! org
[Download RAW message or body]

Git commit 4e07f8fc7ffd35fd4123720c8e00ee2656d04b1a by Dr. Robert Marmorstein.
Committed on 01/08/2011 at 18:09.
Pushed by robertm into branch 'master'.

Fix null-pointer dereference.

M  +3    -2    libs/kotext/changetracker/KTextShapeData.cpp

http://commits.kde.org/koffice/4e07f8fc7ffd35fd4123720c8e00ee2656d04b1a

diff --git a/libs/kotext/changetracker/KTextShapeData.cpp b/libs/kotext/changetracker/KTextShapeData.cpp
index 2d213e8..8686281 100644
--- a/libs/kotext/changetracker/KTextShapeData.cpp
+++ b/libs/kotext/changetracker/KTextShapeData.cpp
@@ -224,9 +224,10 @@ bool KTextShapeData::loadOdf(const KXmlElement &element, KShapeLoadingContext &c
     QTextCursor cursor(document());
     loader.loadBody(element, cursor);   // now let's load the body from the ODF KXmlElement.
     KoTextEditor *editor = KTextDocument(document()).textEditor();
-    if (editor) // at one point we have to get the position from the odf doc instead.
+    if (editor) { // at one point we have to get the position from the odf doc instead.
         editor->setPosition(0);
-    editor->finishedLoading();
+        editor->finishedLoading();
+    }
 
     return true;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic