From a9bddaac646f85032e664918dff843901e7950a2 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 19 Feb 2024 06:27:24 +0300 Subject: [PATCH] engine: platform: win32: do not call filesystem functions if filesystem_stdio was failed to load --- engine/platform/win32/lib_win.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/platform/win32/lib_win.c b/engine/platform/win32/lib_win.c index 69e9cdd4..ef5f8aef 100644 --- a/engine/platform/win32/lib_win.c +++ b/engine/platform/win32/lib_win.c @@ -356,13 +356,13 @@ static void ListMissingModules( dll_user_t *hInst ) byte *data; char buf[MAX_VA_STRING]; - if ( !hInst ) return; - - data = FS_LoadFile( hInst->dllName, NULL, false ); - if ( !data ) return; + if( !hInst || !g_fsapi.LoadFile ) return; + + data = g_fsapi.LoadFile( hInst->dllName, NULL, false ); + if( !data ) return; importDesc = GetImportDescriptor( hInst->dllName, data, &peHeader ); - if ( !importDesc ) + if( !importDesc ) { Mem_Free( data ); return;