libsdl-org / SDL_shadercross

Shader translation library for SDL's GPU API.
zlib License
57 stars 18 forks source link

Add NULL checks #61

Open Beyley opened 22 hours ago

Beyley commented 22 hours ago

This function can return NULL on error, and right now a null de-reference occurs when this happened.

All cases where it returns NULL, it also sets the SDL error string, so I don't do that here.

Also fixed a similar case when calling D3DCompile. vkd3d logs to the console on its own, but does not set the error blob. vkd3d:60115:fixme:hlsl_compile_shader Unknown compilation target "vs_5_1".

thatcosmonaut commented 9 hours ago

Looks great aside from my one comment.