diff --git a/coders/aai.c b/coders/aai.c
index 5e767e7..f4367a8 100644
--- a/coders/aai.c
+++ b/coders/aai.c
@@ -171,7 +171,7 @@
         ThrowReaderException(CorruptImageError,"UnableToReadImageData");
       p=pixels;
       q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
-      if (q == (const Quantum *) NULL)
+      if (q == (Quantum *) NULL)
         break;
       for (x=0; x < (ssize_t) image->columns; x++)
       {