On Sunday 26 October 2008, Thomas Zander wrote: > SVN commit 875905 by zander: > > After the refactor with dataMaps we started seeing various crashes, > this fixes the one in KWFrameLayout and removes code in the scripting > engine that no longer can work. > > M +4 -1 part/frames/KWFrameLayout.cpp > M +0 -31 plugins/scripting/FrameSet.h > M +0 -12 plugins/scripting/Module.cpp > M +1 -14 plugins/scripting/Module.h > > > --- trunk/koffice/kword/part/frames/KWFrameLayout.cpp #875904:875905 > @@ -499,7 +499,10 @@ > Q_ASSERT(page.isValid()); > KoShapeFactory *factory = > KoShapeRegistry::instance()->value(TextShape_SHAPEID); Q_ASSERT(factory); > - KoShape *shape = > factory->createDefaultShapeAndInit(m_document->dataCenterMap()); + > QMap dataCenterMap; > + if (m_document) > + dataCenterMap = m_document->dataCenterMap(); > + KoShape *shape = factory->createDefaultShapeAndInit(dataCenterMap); > shape->setPosition(QPointF(0, page.offsetInDocument())); > return shape; > } In which cases it is possible that you do not have any document? The problem with that is that some shapes (text and picture shape) will not work when the dataCenterMap is empty. Thorsten _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel