|
|
Do not crash when loading .kwd files with active table frame-sets ...
- Rene Rebe <rene@rocklinux.org>
--- koffice-1.2.94/kword/kwcanvas.cc.orig 2003-10-27 14:21:54.000000000 +0100
+++ koffice-1.2.94/kword/kwcanvas.cc 2003-12-09 21:34:00.000000000 +0100
@@ -2623,6 +2623,8 @@
if ( !m_currentFrameSetEdit ) return -1; KWTextFrameSetEdit *edit=dynamic_cast<KWTextFrameSetEdit *>(m_currentFrameSetEdit->currentTextEdit()); + if (!edit)
+ return -1;
KWTextFrameSet* textfs = edit->textFrameSet(); if ( textfs && textfs->getGroupManager() ) return static_cast<KWTableFrameSet::Cell *>(textfs)->firstRow(); @@ -2634,6 +2636,8 @@
if ( !m_currentFrameSetEdit ) return -1; KWTextFrameSetEdit *edit=dynamic_cast<KWTextFrameSetEdit *>(m_currentFrameSetEdit->currentTextEdit()); + if (!edit)
+ return -1;
KWTextFrameSet* textfs = edit->textFrameSet(); if ( textfs && textfs->getGroupManager() ) return static_cast<KWTableFrameSet::Cell *>(textfs)->firstCol();
|