Skip to content

Commit

Permalink
Fix null pointer crash.
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
Avi Drissman committed Jul 26, 2017
1 parent ea7b64b commit 6cf4bac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chrome/browser/printing/print_job_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void PrintJobWorker::GetSettingsWithUI(

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

// weak_factory_ creates pointers valid only on owner_ thread.
Expand Down

0 comments on commit 6cf4bac

Please sign in to comment.