diff options
author | Praveen Innamuri <pinnamuri> | 2011-02-28 17:54:35 +0000 |
---|---|---|
committer | Praveen Innamuri <pinnamuri> | 2011-02-28 17:54:35 +0000 |
commit | a73c79701168d17f089f2c9df8354048c88e3bd6 (patch) | |
tree | ff2198c1214741750ae5bd249b5e197c4f8b3f1e | |
parent | 8e7a2cdec06d726306bf2c49d3acda07871e5da8 (diff) | |
download | eclipse.platform.swt-a73c79701168d17f089f2c9df8354048c88e3bd6.tar.gz eclipse.platform.swt-a73c79701168d17f089f2c9df8354048c88e3bd6.tar.xz eclipse.platform.swt-a73c79701168d17f089f2c9df8354048c88e3bd6.zip |
Bug 275071 - possible NPE in printer
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java index dd71dd0a11..e83cfac6d2 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java @@ -141,6 +141,7 @@ public static PrinterData getDefaultPrinterData() { if (commaIndex < length) { deviceName = buf.toString(0, commaIndex); } + if (deviceName == null) return null; String driver = ""; //$NON-NLS-1$ if (OS.GetProfileString(profile, new TCHAR(0, deviceName, true), nullBuf, buf, length) > 0) { commaIndex = 0; |