From 5ec08231a34505a895dd98935fa329e5af4985a0 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Tue, 10 Oct 2023 23:37:11 +0300 Subject: [PATCH] Match new with delete (#238) Only applicable if we actually fail to create a vsurface --- Standard Gaming Platform/vsurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Standard Gaming Platform/vsurface.cpp b/Standard Gaming Platform/vsurface.cpp index 0df8bab77..905cf8937 100644 --- a/Standard Gaming Platform/vsurface.cpp +++ b/Standard Gaming Platform/vsurface.cpp @@ -1190,7 +1190,7 @@ HVSURFACE CreateVideoSurface( VSURFACE_DESC *VSurfaceDesc ) DbgMessage( TOPIC_VIDEOSURFACE, DBG_LEVEL_2, String( "Failed to create Video Surface in video memory" ) ); DDReleaseSurface ( &lpDDS, &lpDDS2 ); - MemFree( hVSurface ); + delete hVSurface; return( NULL ); }