Git commit d03cbb78429cfee088f0c732d04bc3e08b34c6af by Dr. Robert Marmorstein. Committed on 01/08/2011 at 18:01. Pushed by robertm into branch 'master'. Avoid null pointer dereference. Another static checking catch. M +3 -2 libs/kotext/KTextShapeData.cpp http://commits.kde.org/koffice/d03cbb78429cfee088f0c732d04bc3e08b34c6af diff --git a/libs/kotext/KTextShapeData.cpp b/libs/kotext/KTextShapeData.cpp index efbfb0b..d912106 100644 --- a/libs/kotext/KTextShapeData.cpp +++ b/libs/kotext/KTextShapeData.cpp @@ -225,9 +225,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; }