From 01efa03bcf9c158fd3bd7fa4f81800d00a1e221c Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 14 Jan 2014 17:02:30 +0000 Subject: [PATCH] --- Magick++/lib/Image.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index e9c628135e..280b75bde0 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -2296,7 +2296,10 @@ void Magick::Image::colorMap(const size_t index_,const Color &color_) Magick::Color Magick::Image::colorMap(const size_t index_) const { if (!constImage()->colormap) - throwExceptionExplicit(OptionError,"Image does not contain a colormap"); + { + throwExceptionExplicit(OptionError,"Image does not contain a colormap"); + return(Color()); + } if (index_ > constImage()->colors-1) throwExceptionExplicit(OptionError,"Index out of range");