Check whether on_screen is null before performing CFBooleanGetValue()

A crash may randomly happen in IsWindowMinimized(), the potential reason is that
|on_screen| is not retrieved from |window| with kCGWindowIsOnScreen property. So
add a == NULL check before executing CFBooleanGetValue().

Bug: chromium:758554
Change-Id: I25ad1ddbb21ec049ef237e55a8d25156bcd982c7
Reviewed-on: https://chromium-review.googlesource.com/634043
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#19527}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: c1f691dff2fa7af96fbb51d4cdc83e9e84accdd0
1 file changed