mirror of
https://github.com/microsoft/PowerToys
synced 2025-09-05 08:55:13 +00: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()
|
||||
{
|
||||
if (nullptr == m_shape || nullptr == m_shape.Shapes())
|
||||
{
|
||||
// Guard against m_shape not being initialized.
|
||||
return;
|
||||
}
|
||||
|
||||
m_shape.Shapes().Clear();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user