Don't freeze when openning a modal view twice.

This commit is contained in:
Matthew Einhorn 2013-04-28 13:44:11 -04:00
parent 3c62069bb8
commit 45ecfbe363
1 changed files with 3 additions and 0 deletions

View File

@ -166,6 +166,9 @@ class ModalView(AnchorLayout):
window, the view will attach to the global
:class:`~kivy.core.window.Window`.
'''
if self._window is not None:
Logger.warning('ModalView: you can only open once.')
return self
# search window
self._window = self._search_window()
if not self._window: