[gimp] Issue #5002: compare pointer to NULL, not 0.



commit 2678bafca2804e6dcc11bed2d467c6f5eb5285de
Author: Jehan <jehan girinstud io>
Date:   Tue Apr 28 16:38:24 2020 +0200

    Issue #5002: compare pointer to NULL, not 0.
    
    This is a remnant from the old API where we were using item IDs.

 plug-ins/file-psd/psd-load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index 2b5ba3c4df..082a1d169f 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -1791,7 +1791,7 @@ add_layers (GimpImage *image,
   g_array_free (parent_group_stack, FALSE);
 
   /* Set the active layer */
-  if (active_layer >= 0)
+  if (active_layer != NULL)
     gimp_image_set_active_layer (image, active_layer);
 
   return 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]