mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
DrawList: made AddCallback() assert when passing a null callback.
This commit is contained in:
parent
230418a75d
commit
ea8a5a9e17
2 changed files with 2 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ Other Changes:
|
||||||
unmoved. We revert back to move to the end of line in this situation.
|
unmoved. We revert back to move to the end of line in this situation.
|
||||||
- DrawList: fixed CloneOutput() unnecessarily taking a copy of the ImDrawListSharedData
|
- DrawList: fixed CloneOutput() unnecessarily taking a copy of the ImDrawListSharedData
|
||||||
pointer, which could to issue when deleting the cloned list. (#8894, #1860)
|
pointer, which could to issue when deleting the cloned list. (#8894, #1860)
|
||||||
|
- DrawList: made AddCallback() assert when passing a null callback.
|
||||||
- Debug Tools: ID Stack Tool: fixed using fixed-size buffers preventing long identifiers
|
- Debug Tools: ID Stack Tool: fixed using fixed-size buffers preventing long identifiers
|
||||||
from being displayed in the tool. (#8905, #4631)
|
from being displayed in the tool. (#8905, #4631)
|
||||||
- Debug Tools: ID Stack Tool: when ### is used, uncontributing prefix before the ###
|
- Debug Tools: ID Stack Tool: when ### is used, uncontributing prefix before the ###
|
||||||
|
|
|
||||||
|
|
@ -518,6 +518,7 @@ void ImDrawList::AddCallback(ImDrawCallback callback, void* userdata, size_t use
|
||||||
{
|
{
|
||||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||||
|
IM_ASSERT(callback != NULL);
|
||||||
IM_ASSERT(curr_cmd->UserCallback == NULL);
|
IM_ASSERT(curr_cmd->UserCallback == NULL);
|
||||||
if (curr_cmd->ElemCount != 0)
|
if (curr_cmd->ElemCount != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue