[MouseHighlighter]Fix crash on non initialized shapes (#22907)

This commit is contained in:
Jaime Bernardo
2022-12-20 19:29:05 +00:00
committed by GitHub
parent 3739b771e5
commit 4f4810acc4

View File

@@ -204,6 +204,12 @@ void Highlighter::StartDrawingPointFading(MouseButton button)
void Highlighter::ClearDrawing()
{
if (nullptr == m_shape || nullptr == m_shape.Shapes())
{
// Guard against m_shape not being initialized.
return;
}
m_shape.Shapes().Clear();
}