prevent silent crashes

This commit is contained in:
Martin Wagner 2022-04-23 13:20:10 +02:00
parent 9869bd8753
commit 142ff75774
1 changed files with 4 additions and 1 deletions

View File

@ -3819,7 +3819,10 @@ class mpdevil(Gtk.Application):
Gtk.binding_entry_remove(Gtk.binding_set_find('GtkTreeView'), Gdk.keyval_from_name("space"), Gdk.ModifierType.MOD2_MASK)
def do_activate(self):
self._window.present()
try:
self._window.present()
except: # failed to show window so the user can't see anything
self.quit()
def do_shutdown(self):
Gtk.Application.do_shutdown(self)