diff options
author | 2019-11-13 04:08:23 +0100 | |
---|---|---|
committer | 2019-11-12 22:08:23 -0500 | |
commit | 0c70101b74db61f883fdd7907a4975ffff735044 (patch) | |
tree | 067ae1c831088d6853b6f443e5a05a4c5d8cd7aa /3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp | |
parent | c089bea7011de9ca78f43979d902978a113d33e2 (diff) |
Sync bgfx, bx and bimg with upstream; fix the hlsl fs_chroma.sc matrix transposition properly (#5875)
* Sync bgfx with upstream revision 280420d
* Sync bx with upstream revision 267727d
* Sync bimg with upstream revision c1bab10
* Use bgfx helper functions to ensure correct matrix orientation
* Rebuild hlsl chain
Diffstat (limited to '3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp')
-rw-r--r-- | 3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp b/3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp index 636dac8c875..1d31283731c 100644 --- a/3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp +++ b/3rdparty/bgfx/3rdparty/spirv-tools/source/binary.cpp @@ -781,9 +781,10 @@ spv_result_t spvBinaryParse(const spv_const_context context, void* user_data, // TODO(dneto): This probably belongs in text.cpp since that's the only place // that a spv_binary_t value is created. void spvBinaryDestroy(spv_binary binary) { - if (!binary) return; - delete[] binary->code; - delete binary; + if (binary) { + if (binary->code) delete[] binary->code; + delete binary; + } } size_t spv_strnlen_s(const char* str, size_t strsz) { |