Fix crash when application is using unsupported function.
Fix crash when application is using unsupported function.

It fixes this crash:
https://gist.github.com/achanot/7e0d25d1e5a619a61b688ec895c7a349

Zorro666/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,baldurk/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,baldurk/renderdoc