mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[MouseHighlighter]Fix crash on non initialized shapes (#22907)
This commit is contained in:
@@ -204,6 +204,12 @@ void Highlighter::StartDrawingPointFading(MouseButton button)
|
|||||||
|
|
||||||
void Highlighter::ClearDrawing()
|
void Highlighter::ClearDrawing()
|
||||||
{
|
{
|
||||||
|
if (nullptr == m_shape || nullptr == m_shape.Shapes())
|
||||||
|
{
|
||||||
|
// Guard against m_shape not being initialized.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_shape.Shapes().Clear();
|
m_shape.Shapes().Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user