mirror of
https://github.com/reactos/reactos.git
synced 2025-06-07 10:20:26 +00:00
fixed a bug in DdDeleteDirectDrawObject
Zero the DirectDraw handler if it have sussess been free svn path=/trunk/; revision=25210
This commit is contained in:
parent
412dfceb6a
commit
885e2ecded
1 changed files with 8 additions and 1 deletions
|
@ -742,6 +742,10 @@ DdDeleteDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal)
|
||||||
{
|
{
|
||||||
/* Free it */
|
/* Free it */
|
||||||
Return = NtGdiDdDeleteDirectDrawObject((HANDLE)pDirectDrawGlobal->hDD);
|
Return = NtGdiDdDeleteDirectDrawObject((HANDLE)pDirectDrawGlobal->hDD);
|
||||||
|
if (Return == TRUE)
|
||||||
|
{
|
||||||
|
pDirectDrawGlobal->hDD = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (ghDirectDraw)
|
else if (ghDirectDraw)
|
||||||
{
|
{
|
||||||
|
@ -753,9 +757,12 @@ DdDeleteDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal)
|
||||||
{
|
{
|
||||||
/* Delete the object */
|
/* Delete the object */
|
||||||
Return = NtGdiDdDeleteDirectDrawObject(ghDirectDraw);
|
Return = NtGdiDdDeleteDirectDrawObject(ghDirectDraw);
|
||||||
|
if (Return == TRUE)
|
||||||
|
{
|
||||||
ghDirectDraw = 0;
|
ghDirectDraw = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Return */
|
/* Return */
|
||||||
return Return;
|
return Return;
|
||||||
|
|
Loading…
Reference in a new issue