mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-14 17:07:01 +00:00
ImDrawList: Fixed CloneOutput() helper crashing. Also removed unnecessary risk from ImDrawList::Clear(), draw lists are being clear before use each frame anyway. (#1860)
This commit is contained in:
parent
2645a2516f
commit
b82e99c032
@ -42,7 +42,8 @@ Breaking Changes:
|
||||
the new names and equivalent.
|
||||
|
||||
Other Changes:
|
||||
- ImDrawList::ChannelsSplit(), ImDrawListSlitter: Fixed an issue with merging draw commands between channel 0 and 1. (#2624)
|
||||
- ImDrawList: Fixed CloneOutput() helper crashing. (#1860) [@gviot]
|
||||
- ImDrawListSlitter, ImDrawList::ChannelsSplit(), : Fixed an issue with merging draw commands between channel 0 and 1. (#2624)
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -365,7 +365,7 @@ void ImDrawList::Clear()
|
||||
CmdBuffer.resize(0);
|
||||
IdxBuffer.resize(0);
|
||||
VtxBuffer.resize(0);
|
||||
Flags = _Data->InitialFlags;
|
||||
Flags = _Data ? _Data->InitialFlags : ImDrawListFlags_None;
|
||||
_VtxCurrentOffset = 0;
|
||||
_VtxCurrentIdx = 0;
|
||||
_VtxWritePtr = NULL;
|
||||
@ -392,7 +392,7 @@ void ImDrawList::ClearFreeMemory()
|
||||
|
||||
ImDrawList* ImDrawList::CloneOutput() const
|
||||
{
|
||||
ImDrawList* dst = IM_NEW(ImDrawList(NULL));
|
||||
ImDrawList* dst = IM_NEW(ImDrawList(_Data));
|
||||
dst->CmdBuffer = CmdBuffer;
|
||||
dst->IdxBuffer = IdxBuffer;
|
||||
dst->VtxBuffer = VtxBuffer;
|
||||
|
Loading…
Reference in New Issue
Block a user