diff --git a/coders/webp.c b/coders/webp.c
index 95ac4c9..cb19dfa 100644
--- a/coders/webp.c
+++ b/coders/webp.c
@@ -652,7 +652,7 @@
       break;
   }
   webp_status=WebPEncode(&configure,&picture);
-  if (webp_status != VP8_ENC_OK)
+  if (webp_status == 0)
     {
       const char
         *message;