Skip to content

Commit

Permalink
Fix Mac print crash
Browse files Browse the repository at this point in the history
Stop executing the "OK branch" when the user cancels a print on Mac.

BUG=57125
TEST=manual, see bug description

Review URL: http://codereview.chromium.org/3509009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60914 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
gfeher@chromium.org committed Sep 29, 2010
1 parent 8938fd7 commit 7196bda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions printing/printing_context_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@
// TODO(stuartmorgan): We really want a tab sheet here, not a modal window.
// Will require restructuring the PrintingContext API to use a callback.
NSInteger selection = [panel runModalWithPrintInfo:printInfo];
if (selection != NSOKButton) {
if (selection == NSOKButton) {
ParsePrintInfo([panel printInfo]);
callback->Run(OK);
} else {
callback->Run(CANCEL);
}

ParsePrintInfo([panel printInfo]);
callback->Run(OK);
}

PrintingContext::Result PrintingContext::UseDefaultSettings() {
Expand Down

0 comments on commit 7196bda

Please sign in to comment.