mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-29 19:17:24 +01:00
ImDrawList: ChannelsSetCurrent() added an extra assert
This commit is contained in:
parent
8eb4df0dd6
commit
a5132286b7
@ -291,6 +291,7 @@ void ImDrawList::ChannelsMerge()
|
|||||||
|
|
||||||
void ImDrawList::ChannelsSetCurrent(int idx)
|
void ImDrawList::ChannelsSetCurrent(int idx)
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(idx < _ChannelsCount);
|
||||||
if (_ChannelsCurrent == idx) return;
|
if (_ChannelsCurrent == idx) return;
|
||||||
memcpy(&_Channels.Data[_ChannelsCurrent].CmdBuffer, &CmdBuffer, sizeof(CmdBuffer)); // copy 12 bytes, four times
|
memcpy(&_Channels.Data[_ChannelsCurrent].CmdBuffer, &CmdBuffer, sizeof(CmdBuffer)); // copy 12 bytes, four times
|
||||||
memcpy(&_Channels.Data[_ChannelsCurrent].IdxBuffer, &IdxBuffer, sizeof(IdxBuffer));
|
memcpy(&_Channels.Data[_ChannelsCurrent].IdxBuffer, &IdxBuffer, sizeof(IdxBuffer));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user