Mercurial > pidgin.yaz
changeset 32580:23b16f51e15a
Don't crash if we don't have any theme installed.
author | masca@cpw.pidgin.im |
---|---|
date | Sat, 06 Feb 2010 22:08:41 +0000 |
parents | 041d5144730f |
children | 24c8a98a6acc |
files | pidgin/plugins/adiumthemes/webkit.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/plugins/adiumthemes/webkit.c Fri Jan 22 00:51:25 2010 +0000 +++ b/pidgin/plugins/adiumthemes/webkit.c Sat Feb 06 22:08:41 2010 +0000 @@ -39,6 +39,7 @@ /* Purple headers */ #include <conversation.h> #include <debug.h> +#include <internal.h> #include <notify.h> #include <util.h> #include <version.h> @@ -551,8 +552,15 @@ const char *stylepath = purple_prefs_get_string ("/plugins/gtk/adiumthemes/stylepath"); g_assert (cur_style_dir == NULL); - if (stylepath) + if (stylepath && *stylepath) styles = g_list_prepend (styles, g_strdup (stylepath)); + else { + purple_notify_error(handle, _("Webkit themes"), + _("Can't find installed styles"), + _("Please install some theme and verify the installation path")); + + return; + } /* pick any one that works. Note that we have first preference * for the one in the userdir */