diff --git a/MagickCore/histogram.c b/MagickCore/histogram.c
index ac93dc4..7a07c42 100644
--- a/MagickCore/histogram.c
+++ b/MagickCore/histogram.c
@@ -1268,7 +1268,7 @@
       {
         q=QueueCacheViewAuthenticPixels(unique_view,cube_info->x,0,1,1,
           exception);
-        if (q == (const Quantum *) NULL)
+        if (q == (Quantum *) NULL)
           continue;
         SetPixelRed(unique_image,p->red,q);
         SetPixelGreen(unique_image,p->green,q);