Add assertion in CGraphics_Threaded::LoadTextureRawSub

To check for invalid texture handle.
This commit is contained in:
Robert Müller 2023-07-19 14:59:40 +02:00
parent 21bbc8be61
commit b432feb9b0

View file

@ -330,6 +330,8 @@ static bool ConvertToRGBA(uint8_t *pDest, const uint8_t *pSrc, size_t SrcWidth,
int CGraphics_Threaded::LoadTextureRawSub(CTextureHandle TextureID, int x, int y, int Width, int Height, int Format, const void *pData)
{
dbg_assert(TextureID.IsValid(), "Invalid texture handle used with LoadTextureRawSub.");
CCommandBuffer::SCommand_Texture_Update Cmd;
Cmd.m_Slot = TextureID.Id();
Cmd.m_X = x;