From 7e59c08fc05e70f66836d07e2bd8be18b116aafc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 May 2026 08:57:47 +0530 Subject: [PATCH] Be defensive --- kitty/dnd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kitty/dnd.c b/kitty/dnd.c index dbb464533..c98fad6d9 100644 --- a/kitty/dnd.c +++ b/kitty/dnd.c @@ -2242,8 +2242,10 @@ finish_remote_data_if_all_items_received(Window *w, unsigned mime_item_idx) { static bool all_children_complete(DragRemoteItem *parent) { - for (size_t i = 0; i < parent->children_sz; i++) { - if (!parent->children[i].completed) return false; + if (parent->children) { + for (size_t i = 0; i < parent->children_sz; i++) { + if (!parent->children[i].completed) return false; + } } return true; }