[nautilus] list-base: Add missing `else`



commit 49735dc3d89331c61d9ba7e132aa55eed23c099d
Author: António Fernandes <antoniof gnome org>
Date:   Sun Jul 3 14:51:28 2022 +0100

    list-base: Add missing `else`
    
    We didn't crash because G_VALUE_HOLDS() includes a check for NULL. But
    it still issues a warning because we shouldn't pass it a NULL value.

 src/nautilus-list-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index 7c193d55f..fe7e25589 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -590,7 +590,7 @@ get_preferred_action (NautilusFile *target_file,
     {
         action = nautilus_dnd_get_prefered_action (target_file, NULL);
     }
-    if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST))
+    else if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST))
     {
         GSList *source_file_list = g_value_get_boxed (value);
         action = nautilus_dnd_get_prefered_action (target_file, source_file_list->data);


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