r20944 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Tue Feb 9 14:40:18 UTC 2016
Author: craig
Date: Tue Feb 9 14:40:18 2016
New Revision: 20944
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20944
Log:
coverity #1350191: Unchecked dynamic_cast
Modified:
trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
Modified: trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20944&path=/trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/hunspellcheck/hunspellplugin.cpp Tue Feb 9 14:40:18 2016
@@ -87,9 +87,14 @@
{
HunspellPluginImpl *hunspellPluginImpl = new HunspellPluginImpl();
Q_CHECK_PTR(hunspellPluginImpl);
+ bool result = false;
if (parent)
- hunspellPluginImpl->setRunningForSE(true, dynamic_cast<StoryEditor*>(parent));
- bool result = hunspellPluginImpl->run(target, doc);
+ {
+ StoryEditor* se = dynamic_cast<StoryEditor*>(parent);
+ if (se)
+ hunspellPluginImpl->setRunningForSE(true, se);
+ }
+ result = hunspellPluginImpl->run(target, doc);
delete hunspellPluginImpl;
return result;
}
More information about the scribus-commit
mailing list