r21713 by jghali - fix coverity 1398470: explicit null dereference
scribus-commit
scribus-commit at lists.scribus.net
Sun Jan 8 16:53:00 UTC 2017
Author: jghali
Date: Sun Jan 8 16:53:00 2017
New Revision: 21713
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21713
Log:
fix coverity 1398470: explicit null dereference
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21713&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun Jan 8 16:53:00 2017
@@ -16491,9 +16491,9 @@
QString ScribusDoc::getNumberStr(QString numName, int level, bool reset, const ParagraphStyle &style)
{
Q_ASSERT(numerations.contains(numName));
- if (!numerations.contains(numName))
+ NumStruct * numS = numerations.value(numName, (NumStruct*) 0);
+ if (!numS)
return QString();
- NumStruct * numS = numerations.value(numName);
numS->m_lastlevel = level;
if (level >= numS->m_nums.count())
return QString();
More information about the scribus-commit
mailing list