Fix out of bounds in editor render image

This commit is contained in:
Jupeyy 2021-07-17 12:53:16 +02:00
parent dbc05f6bb0
commit 4338b4fda6

View file

@ -3954,7 +3954,7 @@ void CEditor::RenderImages(CUIRect ToolBox, CUIRect View)
// render image
int i = m_SelectedImage;
if(i < m_Map.m_lImages.size())
if(i != -1 && i < m_Map.m_lImages.size())
{
CUIRect r;
View.Margin(10.0f, &r);