r21110 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Wed Mar 23 21:34:08 UTC 2016
Author: craig
Date: Wed Mar 23 21:34:08 2016
New Revision: 21110
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21110
Log:
Coverity #1357148: fix dynamic_cast
Modified:
trunk/Scribus/scribus/text/textlayout.cpp
Modified: trunk/Scribus/scribus/text/textlayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21110&path=/trunk/Scribus/scribus/text/textlayout.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textlayout.cpp (original)
+++ trunk/Scribus/scribus/text/textlayout.cpp Wed Mar 23 21:34:08 2016
@@ -101,7 +101,9 @@
// HACK: the ascent set by PageItem_TextFrame::layout()
// is useless, we reset it again based on the y position
ls->setAscent(ls->y() - m_box->boxes().last()->naturalHeight());
- dynamic_cast<GroupBox*>(m_box->boxes().last())->addBox(ls);
+ GroupBox* gb=dynamic_cast<GroupBox*>(m_box->boxes().last());
+ if (gb)
+ gb->addBox(ls);
}
// Remove the last line from the list. Used when we need to backtrack on the layouting.
More information about the scribus-commit
mailing list