Skip to content

Commit 6cf4bac

Browse files
author
Avi Drissman
committed
Fix null pointer crash.
There might not be a WebContents for a print job. BUG=748368 TBR=avi@chromium.org Change-Id: Ic6bc12aa69e7f97b1b7f30894fef2dc57144cbd6 Reviewed-on: https://chromium-review.googlesource.com/585247 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Avi Drissman <avi@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#489396}(cherry picked from commit 6fc1a19) Reviewed-on: https://chromium-review.googlesource.com/587456 Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/branch-heads/3163@{#65} Cr-Branched-From: ff259ba-refs/heads/master@{#488528}
1 parent ea7b64b commit 6cf4bac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chrome/browser/printing/print_job_worker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void PrintJobWorker::GetSettingsWithUI(
240240

241241
// Running a dialog causes an exit to webpage-initiated fullscreen.
242242
// http://crbug.com/728276
243-
if (web_contents->IsFullscreenForCurrentTab())
243+
if (web_contents && web_contents->IsFullscreenForCurrentTab())
244244
web_contents->ExitFullscreen(true);
245245

246246
// weak_factory_ creates pointers valid only on owner_ thread.

0 commit comments

Comments
 (0)