From b8ef6e8671cbbe0f38b80f8307d96031bc59246c Mon Sep 17 00:00:00 2001
From: dirk <dirk@git.imagemagick.org>
Date: Sat, 24 Jan 2015 10:19:18 +0000
Subject: [PATCH] Added check to satisfy coverity.

---
 Magick++/lib/Image.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp
index c8be626c7..b8c49598e 100644
--- a/Magick++/lib/Image.cpp
+++ b/Magick++/lib/Image.cpp
@@ -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())
-- 
2.40.0