mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Match new with delete (#238)
Only applicable if we actually fail to create a vsurface
This commit is contained in:
@@ -1190,7 +1190,7 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc )
|
|||||||
|
|
||||||
DbgMessage( TOPIC_VIDEOSURFACE, DBG_LEVEL_2, String( "Failed to create Video Surface in video memory" ) );
|
DbgMessage( TOPIC_VIDEOSURFACE, DBG_LEVEL_2, String( "Failed to create Video Surface in video memory" ) );
|
||||||
DDReleaseSurface ( &lpDDS, &lpDDS2 );
|
DDReleaseSurface ( &lpDDS, &lpDDS2 );
|
||||||
MemFree( hVSurface );
|
delete hVSurface;
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user