fix a widget with no selectable widgets losing focus

This commit is contained in:
Michael Hudson-Doyle 2017-02-16 11:26:38 +13:00
parent 3e6988c8a4
commit 693ca3d9bf
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ log = logging.getLogger('subiquitycore.ui.container')
def _maybe_call(w, methname): def _maybe_call(w, methname):
if w is None:
return
m = getattr(w.base_widget, methname, None) m = getattr(w.base_widget, methname, None)
if m is not None: if m is not None:
m() m()