io/router: don't panic for nil op.Ops arguements to Router.Frame

Fixes gio#306

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-11-10 13:24:17 +01:00
parent 5ddd572a41
commit 303b819539
2 changed files with 11 additions and 2 deletions
+5
View File
@@ -220,6 +220,11 @@ func TestKeyFocusedInvisible(t *testing.T) {
}
func TestNoOps(t *testing.T) {
r := new(Router)
r.Frame(nil)
}
func assertKeyEvent(t *testing.T, events []event.Event, expected bool, expectedInputs ...event.Event) {
t.Helper()
var evtFocus int