Skip to content

Commit

Permalink
Only raise the exception when an error was raised by ImageMagick.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra authored and mockdeep committed Oct 9, 2019
1 parent 4ece7c8 commit 41d7467
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/RMagick/rmimage.c
Expand Up @@ -2845,7 +2845,10 @@ set_profile(VALUE self, const char *name, VALUE profile)

exception = AcquireExceptionInfo();
m = GetMagickInfo(name, exception);
CHECK_EXCEPTION()
if (exception->severity >= ErrorException)
{
CHECK_EXCEPTION()
}
if (!m)
{
(void) DestroyExceptionInfo(exception);
Expand Down

0 comments on commit 41d7467

Please sign in to comment.