Use device parameter rather than GSWINDEVICE macro in case self destroyed

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36604 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2013-05-09 01:49:46 +00:00
parent 612a141f28
commit 16ef33d4c4

View file

@ -152,8 +152,8 @@
gsDevice = device;
_surface = NULL;
WIN_INTERN *win = (WIN_INTERN *)GetWindowLong(GSWINDEVICE, GWL_USERDATA);
HDC hDC = GetDC(GSWINDEVICE);
WIN_INTERN *win = (WIN_INTERN *)GetWindowLong(device, GWL_USERDATA);
HDC hDC = GetDC(device);
if (hDC == NULL)
{
@ -235,7 +235,7 @@
cairo_surface_destroy(window);
// Release the device context...
ReleaseDC(GSWINDEVICE, hDC);
ReleaseDC(device, hDC);
}
if (self)