From 7c8a6469e15f257d89ec465324a170713196e030 Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 31 Oct 2014 13:08:12 +0000 Subject: [PATCH] --- Magick++/lib/Image.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 0a10a094e..e095651a2 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -930,18 +930,16 @@ std::string Magick::Image::formatExpression(const std::string expression) *text; std::string - result; + text_string; GetPPException; text=InterpretImageProperties(imageInfo(),image(),expression.c_str(), exceptionInfo); + std::string text_string(text); if (text != (char *) NULL) - { - result=std::string(text); - text=DestroyString(text); - } + text=DestroyString(text); ThrowPPException; - return(result); + return(text_string); } double Magick::Image::gamma(void) const -- 2.40.0