diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-03-19 20:24:07 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-03-19 20:30:23 +0100 |
commit | 5b0f3cf836054da94968eddffc2647b50236739e (patch) | |
tree | 6006b029939e88c5f8148e35d9b9dfbc1063eb67 /vcl/win | |
parent | a175977e1eb7fe63b2314dcfb3944e87889af455 (diff) |
opengl dr.memory: DC that contains selected object being deleted.
Change-Id: I3cfb09eacfa129a92dace47fd26ccf6e5d1a6756
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/gdi/salgdi.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index fc74d0567779..ff74b0f5546f 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -582,13 +582,14 @@ OpenGLCompatibleDC::OpenGLCompatibleDC(SalGraphics &rGraphics, int x, int y, int mhBitmap = WinSalVirtualDevice::ImplCreateVirDevBitmap(mhCompatibleDC, width, height, 32, reinterpret_cast<void **>(&mpData)); - SelectObject(mhCompatibleDC, mhBitmap); + mhOrigBitmap = (HBITMAP) SelectObject(mhCompatibleDC, mhBitmap); } OpenGLCompatibleDC::~OpenGLCompatibleDC() { if (mpImpl) { + SelectObject(mhCompatibleDC, mhOrigBitmap); DeleteObject(mhBitmap); DeleteDC(mhCompatibleDC); } |