# HG changeset patch # User masca@cpw.pidgin.im # Date 1265494121 0 # Node ID 23b16f51e15a247289591c7306a8975b4d10fe9b # Parent 041d5144730f32aa5f9a5eb6553b28708437ecf4 Don't crash if we don't have any theme installed. diff -r 041d5144730f -r 23b16f51e15a pidgin/plugins/adiumthemes/webkit.c --- 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 #include +#include #include #include #include @@ -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 */