summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qnativeimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qnativeimage.cpp')
-rw-r--r--src/gui/image/qnativeimage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 6b74323..33e565c 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -100,7 +100,9 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool is
bmi.blueMask = 0;
}
- hdc = CreateCompatibleDC(qt_win_display_dc());
+ HDC display_dc = GetDC(0);
+ hdc = CreateCompatibleDC(display_dc);
+ ReleaseDC(0, display_dc);
Q_ASSERT(hdc);
uchar *bits = 0;