]> git.imager.perl.org - imager.git/commitdiff
remove a pointless NULL check from i_flipxy()
authorTony Cook <tony@develop-help.com>
Sun, 3 Feb 2019 08:40:43 +0000 (19:40 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Feb 2019 08:40:43 +0000 (19:40 +1100)
im is deferred earlier to get the context, and passing a NULL or invalid
image pointer in is a bug in the caller.

flip.im

diff --git a/flip.im b/flip.im
index d286b91f432c3e206a5dcaf1ff629be62f8ae42d..dfb97af9d35beb34acf72085d58ec732d08991d6 100644 (file)
--- a/flip.im
+++ b/flip.im
@@ -28,9 +28,6 @@ i_flipxy(i_img *im, int direction) {
 
   im_log((aIMCTX, 1, "i_flipxy(im %p, direction %d)\n", im, direction ));
 
-  if (!im)
-    return 0;
-
   switch (direction) {
   case XAXIS: /* Horizontal flip */
     flip_h(im);