diff --git a/src/SDL_gpu_shadercross.c b/src/SDL_gpu_shadercross.c index be5d811..2be9df8 100644 --- a/src/SDL_gpu_shadercross.c +++ b/src/SDL_gpu_shadercross.c @@ -298,6 +298,10 @@ static void *SDL_ShaderCross_INTERNAL_CompileUsingDXC( IDxcCompiler3 *dxcInstance = NULL; #if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES) + if (SDL_DxcCreateInstance == NULL) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s", "DxcCreateInstance function not loaded. Did you forget to call Init?"); + return NULL; + } SDL_DxcCreateInstance( &CLSID_DxcCompiler, IID_IDxcCompiler3,