diff --git a/webrtc/modules/desktop_capture/mac/window_list_utils.cc b/webrtc/modules/desktop_capture/mac/window_list_utils.cc index 88b8367d05..6fc697bd9b 100644 --- a/webrtc/modules/desktop_capture/mac/window_list_utils.cc +++ b/webrtc/modules/desktop_capture/mac/window_list_utils.cc @@ -141,7 +141,7 @@ bool IsWindowFullScreen( bool IsWindowMinimized(CFDictionaryRef window) { CFBooleanRef on_screen = reinterpret_cast( CFDictionaryGetValue(window, kCGWindowIsOnscreen)); - return !CFBooleanGetValue(on_screen); + return on_screen != NULL && !CFBooleanGetValue(on_screen); } // Returns true if the window is minimized.