mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Patch from Christian Kirbach to prevent a critical warning crasher when
2006-01-21 Elijah Newren <newren gmail com> Patch from Christian Kirbach to prevent a critical warning crasher when switching themes. #327847. * src/theme.c (meta_theme_free): since themes are only constructed as needed and may be NULL, check for that before freeing theme hash tables
This commit is contained in:
parent
8808c8b500
commit
9ce85d7657
@ -1,3 +1,12 @@
|
||||
2006-01-21 Elijah Newren <newren gmail com>
|
||||
|
||||
Patch from Christian Kirbach to prevent a critical warning crasher
|
||||
when switching themes. #327847.
|
||||
|
||||
* src/theme.c (meta_theme_free): since themes are only constructed
|
||||
as needed and may be NULL, check for that before freeing theme
|
||||
hash tables
|
||||
|
||||
2006-01-21 Elijah Newren <newren gmail com>
|
||||
|
||||
* src/common.h (enum MetaActionDoubleClickTitlebar):
|
||||
|
20
src/theme.c
20
src/theme.c
@ -4533,12 +4533,20 @@ meta_theme_free (MetaTheme *theme)
|
||||
g_free (theme->author);
|
||||
g_free (theme->copyright);
|
||||
|
||||
g_hash_table_destroy (theme->integer_constants);
|
||||
g_hash_table_destroy (theme->images_by_filename);
|
||||
g_hash_table_destroy (theme->layouts_by_name);
|
||||
g_hash_table_destroy (theme->draw_op_lists_by_name);
|
||||
g_hash_table_destroy (theme->styles_by_name);
|
||||
g_hash_table_destroy (theme->style_sets_by_name);
|
||||
/* be more careful when destroying the theme hash tables,
|
||||
since they are only constructed as needed, and may be NULL. */
|
||||
if (theme->integer_constants)
|
||||
g_hash_table_destroy (theme->integer_constants);
|
||||
if (theme->images_by_filename)
|
||||
g_hash_table_destroy (theme->images_by_filename);
|
||||
if (theme->layouts_by_name)
|
||||
g_hash_table_destroy (theme->layouts_by_name);
|
||||
if (theme->draw_op_lists_by_name)
|
||||
g_hash_table_destroy (theme->draw_op_lists_by_name);
|
||||
if (theme->styles_by_name)
|
||||
g_hash_table_destroy (theme->styles_by_name);
|
||||
if (theme->style_sets_by_name)
|
||||
g_hash_table_destroy (theme->style_sets_by_name);
|
||||
|
||||
i = 0;
|
||||
while (i < META_FRAME_TYPE_LAST)
|
||||
|
Loading…
Reference in New Issue
Block a user