From 5d5cdead48e17cf4f73c7d4ef5994e25b07d80a9 Mon Sep 17 00:00:00 2001 From: Fighter19 <1475802+Fighter19@users.noreply.github.com> Date: Tue, 15 Apr 2025 02:41:44 +0200 Subject: [PATCH] [GEN][ZH] Fix use of uninitialized back-buffer surface pointer --- Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp | 2 +- GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp index caf71e2e47..822f10ff43 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp @@ -2403,7 +2403,7 @@ SurfaceClass * DX8Wrapper::_Get_DX8_Back_Buffer(unsigned int num) { DX8_THREAD_ASSERT(); - IDirect3DSurface8 * bb; + IDirect3DSurface8 * bb=NULL; SurfaceClass *surf=NULL; DX8CALL(GetBackBuffer(num,D3DBACKBUFFER_TYPE_MONO,&bb)); if (bb) diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp index 477d4d2c07..2f1c441165 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp @@ -3161,7 +3161,7 @@ SurfaceClass * DX8Wrapper::_Get_DX8_Back_Buffer(unsigned int num) { DX8_THREAD_ASSERT(); - IDirect3DSurface8 * bb; + IDirect3DSurface8 * bb=NULL; SurfaceClass *surf=NULL; DX8CALL(GetBackBuffer(num,D3DBACKBUFFER_TYPE_MONO,&bb)); if (bb)