Typo: check for success of newest allocations.

svn path=/trunk/; revision=36791
This commit is contained in:
Gregor Schneider 2008-10-17 15:13:27 +00:00
parent 2edf0dbef8
commit 87fd2c6cad

View file

@ -104,7 +104,7 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
/* for more easy to free the memory if something goes wrong */
DxHeapMemAlloc(slist_gbl, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_GBL ) );
if( slist_lcl == NULL )
if( slist_gbl == NULL )
{
DxHeapMemFree(slist_int);
return DDERR_OUTOFMEMORY;
@ -112,7 +112,7 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD,
/* for more easy to free the memory if something goes wrong */
DxHeapMemAlloc(slist_more, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_MORE ) );
if( slist_lcl == NULL )
if( slist_more == NULL )
{
DxHeapMemFree(slist_int);
return DDERR_OUTOFMEMORY;