mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Check selected quad index when rendering quad popup (fixes #7904)
This commit is contained in:
parent
863ae5f9b6
commit
d988b92b38
|
@ -828,6 +828,8 @@ CUI::EPopupMenuFunctionResult CEditor::PopupQuad(void *pContext, CUIRect View, b
|
|||
{
|
||||
CEditor *pEditor = static_cast<CEditor *>(pContext);
|
||||
std::vector<CQuad *> vpQuads = pEditor->GetSelectedQuads();
|
||||
if(pEditor->m_SelectedQuadIndex < 0 || pEditor->m_SelectedQuadIndex >= (int)vpQuads.size())
|
||||
return CUI::POPUP_CLOSE_CURRENT;
|
||||
CQuad *pCurrentQuad = vpQuads[pEditor->m_SelectedQuadIndex];
|
||||
std::shared_ptr<CLayerQuads> pLayer = std::static_pointer_cast<CLayerQuads>(pEditor->GetSelectedLayerType(0, LAYERTYPE_QUADS));
|
||||
|
||||
|
|
Loading…
Reference in a new issue