diff --git a/coders/png.c b/coders/png.c
index eaf68d6..3617563 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -2302,7 +2302,7 @@
             (void) ThrowMagickException(&image->exception,GetMagickModule(),
               ResourceLimitError,"MemoryAllocationFailed","`%s'",
               "unable to copy profile");
-            return(MagickFalse);
+            return((Image *) NULL);
           }
           SetStringInfoDatum(profile,(const unsigned char *) info);
           (void) SetImageProfile(image,"icc",profile);