From 4fe2ca0f758bb5998f4a017b193bce5bdcb62725 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 23 Dec 2016 02:01:09 -0800 Subject: [PATCH] win-capture: Fix possible null pointer dereference --- plugins/win-capture/window-helpers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/win-capture/window-helpers.c b/plugins/win-capture/window-helpers.c index 2c90d7542..09d6554c4 100644 --- a/plugins/win-capture/window-helpers.c +++ b/plugins/win-capture/window-helpers.c @@ -338,6 +338,10 @@ HWND find_window(enum window_search_mode mode, HWND window = first_window(mode, &parent); HWND best_window = NULL; int best_rating = 0; + + if (!class) + return NULL; + bool uwp_window = strcmp(class, "Windows.UI.Core.CoreWindow") == 0; while (window) {