st-theme: ref items in custom stylesheets list
st-theme stores some loaded stylesheets in a custom stylesheets list. When removing items from this list it unrefs them, but when adding items to the list it neglects to ref them. This means that under certain circumstances the list will contain items that have already been freed. https://bugzilla.gnome.org/show_bug.cgi?id=632477
This commit is contained in:
parent
6df48b68fa
commit
a5d4abda00
@ -320,6 +320,7 @@ st_theme_load_stylesheet (StTheme *theme,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
insert_stylesheet (theme, path, stylesheet);
|
insert_stylesheet (theme, path, stylesheet);
|
||||||
|
cr_stylesheet_ref (stylesheet);
|
||||||
theme->custom_stylesheets = g_slist_prepend (theme->custom_stylesheets, stylesheet);
|
theme->custom_stylesheets = g_slist_prepend (theme->custom_stylesheets, stylesheet);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user