diff --git a/coders/magick.c b/coders/magick.c
index ac121ac..5d980e1 100644
--- a/coders/magick.c
+++ b/coders/magick.c
@@ -13534,6 +13534,8 @@
   (void) DestroyImageInfo(write_info);
   if (blob == (void *) NULL)
     return(MagickFalse);
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
   if (status == MagickFalse)
     return(status);