r20962 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Tue Feb 9 22:01:53 UTC 2016
Author: craig
Date: Tue Feb 9 22:01:53 2016
New Revision: 20962
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20962
Log:
coverity #1350167: Unchecked dynamic_cast, and properly initialise a meshPoint variable
Modified:
trunk/Scribus/scribus/pageitem.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20962&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue Feb 9 22:01:53 2016
@@ -3319,7 +3319,7 @@
VisionDefectColor defect;
MQColor = defect.convertDefect(MQColor, m_Doc->previewVisual);
}
- meshPoint *mp;
+ meshPoint *mp = NULL;
if (forPatch)
{
meshGradientPatch *patch = &meshGradientPatches[x];
@@ -5684,7 +5684,9 @@
void PageItem::restoreMarkString(SimpleState *state, bool isUndo)
{
ScItemState< QPair<int,QString> > *is = dynamic_cast<ScItemState< QPair<int,QString> >*>(state);
- Mark * mark = itemText.mark(is->getItem().first);
+ if (!is)
+ return;
+ Mark* mark = itemText.mark(is->getItem().first);
if (!itemText.hasMark(is->getItem().first))
return;
if (isUndo)
More information about the scribus-commit
mailing list