From b11b5861eaf74c6dcca508924dcc48d142333126 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Tue, 10 Oct 2023 23:36:30 +0300 Subject: [PATCH] Match new with delete 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 0df8bab772..905cf8937e 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 ); }