Don't serialise bytecode buffer if size is 0 - leave pointer as NULL

This commit is contained in:
baldurk
2016-07-08 16:16:12 +03:00
parent ba9321e796
commit 5a68bbf3a7
+3 -1
View File
@@ -209,7 +209,9 @@ void Serialiser::Serialise(const char *name, D3D12_SHADER_BYTECODE &el)
el.pShaderBytecode = NULL;
el.BytecodeLength = sz;
}
SerialiseBuffer("pShaderBytecode", (byte *&)el.pShaderBytecode, sz);
if(dataSize > 0)
SerialiseBuffer("pShaderBytecode", (byte *&)el.pShaderBytecode, sz);
}
template <>