Game might not always have a valid runner

This commit is contained in:
Mathieu Comandon 2014-01-28 02:38:15 +01:00
parent 28ae171029
commit c21d70a190

View file

@ -35,7 +35,10 @@ class UninstallGameDialog(GtkBuilderDialog):
remove_contents_button = self.builder.get_object(
'remove_contents_button'
)
default_path = self.game.runner.default_path
try:
default_path = self.game.runner.default_path
except AttributeError:
default_path = "/"
if not is_removeable(self.game.directory, excludes=[default_path]):
remove_contents_button.set_sensitive(False)
path = self.game.directory or 'disk'