From kde-commits Tue Aug 02 09:16:39 2011 From: "Dr. Robert Marmorstein" Date: Tue, 02 Aug 2011 09:16:39 +0000 To: kde-commits Subject: [koffice] libs/kotext/changetracker: Fix null-pointer dereference. Message-Id: <20110802091639.89491A60D4 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=131227666615681 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; }