win-capture: Fix possible null pointer dereference
This commit is contained in:
parent
bd67c18c02
commit
4fe2ca0f75
@ -338,6 +338,10 @@ HWND find_window(enum window_search_mode mode,
|
|||||||
HWND window = first_window(mode, &parent);
|
HWND window = first_window(mode, &parent);
|
||||||
HWND best_window = NULL;
|
HWND best_window = NULL;
|
||||||
int best_rating = 0;
|
int best_rating = 0;
|
||||||
|
|
||||||
|
if (!class)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
bool uwp_window = strcmp(class, "Windows.UI.Core.CoreWindow") == 0;
|
bool uwp_window = strcmp(class, "Windows.UI.Core.CoreWindow") == 0;
|
||||||
|
|
||||||
while (window) {
|
while (window) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user