fix(segmented-button): crash when context menu is unassigned
This commit is contained in:
parent
537486a4ab
commit
c0b653f506
1 changed files with 17 additions and 15 deletions
|
|
@ -883,6 +883,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
// Present a context menu on a right click event.
|
// Present a context menu on a right click event.
|
||||||
|
if self.context_menu.is_some() {
|
||||||
if let Some(on_context) = self.on_context.as_ref() {
|
if let Some(on_context) = self.on_context.as_ref() {
|
||||||
if right_button_released(&event)
|
if right_button_released(&event)
|
||||||
|| (touch_lifted(&event) && fingers_pressed == 2)
|
|| (touch_lifted(&event) && fingers_pressed == 2)
|
||||||
|
|
@ -903,6 +904,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue