Fixes #8104. As described in that issue, a crash happens under the following conditions: 1. A `DrawSketchHandler` is active. 2. No constraint is selected. 3. Context menu on the `ConstraintView` is triggered.
Fixes #8104. As described in that issue, a crash happens under the following conditions: 1. A `DrawSketchHandler` is active. 2. No constraint is selected. 3. Context menu on the `ConstraintView` is triggered.