Avoid an infinite loop when iterating over addons
This commit is contained in:
parent
0c88d21e4d
commit
e5a7b7af90
1 changed files with 7 additions and 4 deletions
|
@ -876,8 +876,7 @@ midori_addons_set_kind (MidoriAddons* addons,
|
||||||
|
|
||||||
addons->kind = kind;
|
addons->kind = kind;
|
||||||
|
|
||||||
if (kind == MIDORI_ADDON_USER_SCRIPTS
|
if (kind == MIDORI_ADDON_USER_SCRIPTS || kind == MIDORI_ADDON_USER_STYLES)
|
||||||
|| kind == MIDORI_ADDON_USER_STYLES)
|
|
||||||
g_signal_connect (addons->web_widget, "window-object-cleared",
|
g_signal_connect (addons->web_widget, "window-object-cleared",
|
||||||
G_CALLBACK (midori_web_widget_window_object_cleared_cb), addons);
|
G_CALLBACK (midori_web_widget_window_object_cleared_cb), addons);
|
||||||
|
|
||||||
|
@ -989,9 +988,13 @@ midori_addons_update_elements (MidoriAddons* addons)
|
||||||
if (addons->kind == MIDORI_ADDON_USER_SCRIPTS)
|
if (addons->kind == MIDORI_ADDON_USER_SCRIPTS)
|
||||||
{
|
{
|
||||||
name = NULL;
|
name = NULL;
|
||||||
if (!_metadata_from_file (fullname, &includes, &excludes, &name,
|
if (!_metadata_from_file (fullname, &includes, &excludes,
|
||||||
&description))
|
&name, &description))
|
||||||
|
{
|
||||||
|
addon_files = g_slist_next (addon_files);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
{
|
{
|
||||||
g_free (displayname);
|
g_free (displayname);
|
||||||
|
|
Loading…
Reference in a new issue