[nautilus/wip/corey/dnd_features: 33/42] list-base: Fix crash when checking preferred action
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/corey/dnd_features: 33/42] list-base: Fix crash when checking preferred action
- Date: Tue, 23 Aug 2022 18:48:04 +0000 (UTC)
commit fc46fc941582d1740ccd08896bc6b5fccdfdf4e4
Author: Corey Berla <corey berla me>
Date: Thu Aug 18 09:40:17 2022 -0700
list-base: Fix crash when checking preferred action
src/nautilus-list-base.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index ac6a6405d..8210b98c3 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -653,7 +653,14 @@ get_preferred_action (NautilusFile *target_file,
else if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST))
{
GSList *source_file_list = g_value_get_boxed (value);
- action = nautilus_dnd_get_preferred_action (target_file, source_file_list->data);
+ if (source_file_list != NULL)
+ {
+ action = nautilus_dnd_get_preferred_action (target_file, source_file_list->data);
+ }
+ else
+ {
+ action = nautilus_dnd_get_preferred_action (target_file, NULL);
+ }
}
else if (G_VALUE_HOLDS (value, G_TYPE_STRING))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]