{"action":"created","issue":{"url":"https://api.github.com/repos/gtk-rs/gtk/issues/344","repository_url":"https://api.github.com/repos/gtk-rs/gtk","labels_url":"https://api.github.com/repos/gtk-rs/gtk/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/gtk-rs/gtk/issues/344/comments","events_url":"https://api.github.com/repos/gtk-rs/gtk/issues/344/events","html_url":"https://github.com/gtk-rs/gtk/issues/344","id":155809695,"number":344,"title":"Panic when issuing `gtk::main_quit()` in `window.connect_delete_event()`","user":{"login":"mmstick","id":4143535,"avatar_url":"https://avatars.githubusercontent.com/u/4143535?v=3","gravatar_id":"","url":"https://api.github.com/users/mmstick","html_url":"https://github.com/mmstick","followers_url":"https://api.github.com/users/mmstick/followers","following_url":"https://api.github.com/users/mmstick/following{/other_user}","gists_url":"https://api.github.com/users/mmstick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmstick/subscriptions","organizations_url":"https://api.github.com/users/mmstick/orgs","repos_url":"https://api.github.com/users/mmstick/repos","events_url":"https://api.github.com/users/mmstick/events{/privacy}","received_events_url":"https://api.github.com/users/mmstick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-19T18:56:56Z","updated_at":"2016-05-19T19:15:27Z","closed_at":null,"body":"In my [application](https://github.com/mmstick/systemd-manager), it would seem that quitting the program with `gtk::main_quit()` in the main window's `connect_delete_event()` closure is causing a panic with `Option::unwrap() on a None`, but issuing `gtk::main_quit()` when the Escape key is pressed does not cause a panic. [relevant code](https://github.com/mmstick/systemd-manager/blob/master/src/systemd_gui.rs#L567:L576)"},"comment":{"url":"https://api.github.com/repos/gtk-rs/gtk/issues/comments/220424455","html_url":"https://github.com/gtk-rs/gtk/issues/344#issuecomment-220424455","issue_url":"https://api.github.com/repos/gtk-rs/gtk/issues/344","id":220424455,"user":{"login":"GuillaumeGomez","id":3050060,"avatar_url":"https://avatars.githubusercontent.com/u/3050060?v=3","gravatar_id":"","url":"https://api.github.com/users/GuillaumeGomez","html_url":"https://github.com/GuillaumeGomez","followers_url":"https://api.github.com/users/GuillaumeGomez/followers","following_url":"https://api.github.com/users/GuillaumeGomez/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeGomez/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeGomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeGomez/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeGomez/orgs","repos_url":"https://api.github.com/users/GuillaumeGomez/repos","events_url":"https://api.github.com/users/GuillaumeGomez/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeGomez/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T19:15:27Z","updated_at":"2016-05-19T19:15:27Z","body":"During my attempt to update your code, I fixed this issue. Build with debug and you'll see the stacktrace. It's not in this closure but in another one."}}