summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorarthurhsu@chromium.org <arthurhsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-14 18:57:39 +0000
committerarthurhsu@chromium.org <arthurhsu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-14 18:57:39 +0000
commitbcf6342dfef840eec089400ded252daacab0c89e (patch)
tree4f0d51d36f5f5bb98def542318c22e9f81241cce /printing
parentbde1141ab1554ee100e0b36367f6d150f649a336 (diff)
downloadchromium_src-bcf6342dfef840eec089400ded252daacab0c89e.zip
chromium_src-bcf6342dfef840eec089400ded252daacab0c89e.tar.gz
chromium_src-bcf6342dfef840eec089400ded252daacab0c89e.tar.bz2
Issue 85963 crash when uninstalling printer while preview tab is open
BUG=85963 TEST=none Review URL: http://codereview.chromium.org/7150001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/printing_context_win.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index 07ac20b..53e8a15 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -348,7 +348,7 @@ PrintingContext::Result PrintingContextWin::UpdatePrintSettings(
DEVMODE* dev_mode = NULL;
LONG buffer_size = DocumentProperties(NULL, printer, device_name_wide,
NULL, NULL, 0);
- if (buffer_size) {
+ if (buffer_size > 0) {
buffer.reset(new uint8[buffer_size]);
memset(buffer.get(), 0, buffer_size);
if (DocumentProperties(NULL, printer, device_name_wide,