]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcprint.cpp
fixed crash on startup under GTK
[wxWidgets.git] / src / msw / dcprint.cpp
index 1d6fad9051afee00d2d09aee9ec8daf110b5c232..f277ca44b823766f5ac602c851e4ef6613bc30cc 100644 (file)
@@ -229,7 +229,6 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
     deviceName.clear();
 
     LPDEVNAMES  lpDevNames;
-    LPTSTR      lpszDriverName;
     LPTSTR      lpszDeviceName;
     LPTSTR      lpszPortName;
 
@@ -263,7 +262,6 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
     if (pd.hDevNames)
     {
         lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames);
-        lpszDriverName = (LPTSTR)lpDevNames + lpDevNames->wDriverOffset;
         lpszDeviceName = (LPTSTR)lpDevNames + lpDevNames->wDeviceOffset;
         lpszPortName   = (LPTSTR)lpDevNames + lpDevNames->wOutputOffset;
 
@@ -347,7 +345,8 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc,
 {
 #if wxUSE_WXDIB
     wxDIB dib(bmp);
-    if ( !dib.IsOk() )
+    bool ok = dib.IsOk();
+    if ( !ok )
         return FALSE;
 
     DIBSECTION ds;