]> granicus.if.org Git - imagemagick/commitdiff
Added check to satisfy coverity.
authordirk <dirk@git.imagemagick.org>
Sat, 24 Jan 2015 10:19:18 +0000 (10:19 +0000)
committerdirk <dirk@git.imagemagick.org>
Sat, 24 Jan 2015 10:19:18 +0000 (10:19 +0000)
Magick++/lib/Image.cpp

index c8be626c704c13dfce7d62188cee031dd7dc5e2c..b8c49598e4150176217fb17a13f75bde96e83150 100644 (file)
@@ -3498,8 +3498,11 @@ void Magick::Image::morphologyChannel(const ChannelType channel_,
 
   option=CommandOptionToMnemonic(MagickKernelOptions,kernel_);
   if (option == (const char *)NULL)
-    throwExceptionExplicit(MagickCore::OptionError,
-      "Unable to determine kernel type.");
+    {
+      throwExceptionExplicit(MagickCore::OptionError,
+        "Unable to determine kernel type.");
+      return;
+    }
 
   kernel=std::string(option);
   if (!arguments_.empty())