From 35cb4e38811472c50f10ce34607871d3bc0ce59b Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Thu, 31 Mar 2011 20:21:19 +0000 Subject: [PATCH] The activity icon does not handle the case of a activity without metadata. If the activity is initiated with create_object=False Acked-by: Sascha Silbe --- src/sugar/activity/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sugar/activity/widgets.py b/src/sugar/activity/widgets.py index b5e4ce77..7166d3e2 100644 --- a/src/sugar/activity/widgets.py +++ b/src/sugar/activity/widgets.py @@ -34,7 +34,7 @@ _ = lambda msg: gettext.dgettext('sugar-toolkit', msg) def _create_activity_icon(metadata): - if metadata.get('icon-color', ''): + if metadata is not None and metadata.get('icon-color'): color = XoColor(metadata['icon-color']) else: client = gconf.client_get_default()