mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
NULL crash fix, nwn
This commit is contained in:
parent
53e20c168f
commit
f38312b078
@ -341,8 +341,15 @@ static HRESULT d3d_device_create_effect(d3d_device *dev, const WCHAR *name, d3d_
|
||||
HRESULT hr = (*g_load_effect)(device, name, NULL, NULL, 0, NULL, (ID3DXEffect**)effect, &buffer_errors);
|
||||
if(FAILED(hr))
|
||||
{
|
||||
LPVOID compile_errors = buffer_errors->GetBufferPointer();
|
||||
printf("Unable to compile shader: %s\n", (const char*)compile_errors);
|
||||
if(buffer_errors != NULL)
|
||||
{
|
||||
LPVOID compile_errors = buffer_errors->GetBufferPointer();
|
||||
printf("Unable to compile shader: %s\n", (const char*)compile_errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unable to compile shader (unspecified reason)\n");
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
|
Loading…
Reference in New Issue
Block a user