From 412c5c4ba677ea9de1dedf2548c606a054525ebe Mon Sep 17 00:00:00 2001 From: LucasMou Date: Wed, 15 Nov 2023 15:54:27 +0800 Subject: [PATCH] fix abnormal exit: when removing the USB flash drive, the program abnormal exit --- channels/rdpdr/client/rdpdr_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 3b4d9c31f..c726c7cbb 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -941,7 +941,7 @@ static BOOL hotplug_delete_foreach(ULONG_PTR key, void* element, void* data) for (i = 0; i < arg->dev_array_size; i++) { hotplug_dev* cur = &arg->dev_array[i]; - if (strstr(path, cur->path) != NULL) + if (cur->path && strstr(path, cur->path) != NULL) { dev_found = TRUE; cur->to_add = FALSE;