summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorgfeher@chromium.org <gfeher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 08:36:52 +0000
committergfeher@chromium.org <gfeher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 08:36:52 +0000
commit7196bdab3c4aaf1781271bce68b4c025c688bda8 (patch)
tree443f90eceb0e8967a6ba6957a266c1e71c199732 /printing
parent8938fd7cbb8b8dea620c67fdf9355842e802097b (diff)
downloadchromium_src-7196bdab3c4aaf1781271bce68b4c025c688bda8.zip
chromium_src-7196bdab3c4aaf1781271bce68b4c025c688bda8.tar.gz
chromium_src-7196bdab3c4aaf1781271bce68b4c025c688bda8.tar.bz2
Fix Mac print crash
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
Diffstat (limited to 'printing')
-rw-r--r--printing/printing_context_mac.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index 2c48748..828a7f4 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -60,12 +60,12 @@ void PrintingContext::AskUserForSettings(gfx::NativeView parent_view,
// 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() {