summaryrefslogtreecommitdiff
path: root/src/theme-parser.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-07 04:22:57 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-07 04:22:57 +0000
commit8f1cfefbb223af8755b1013573d4088d476eae7c (patch)
tree86100aa8a9b37373387e593163e490fea2b10653 /src/theme-parser.c
parentf33a46072b2bcfed59e26f42356175d0f3a62c9a (diff)
downloadmetacity-8f1cfefbb223af8755b1013573d4088d476eae7c.tar.gz
metacity-8f1cfefbb223af8755b1013573d4088d476eae7c.tar.bz2
benchmark theme on startup
2002-02-06 Havoc Pennington <hp@pobox.com> * src/theme-viewer.c: benchmark theme on startup * src/theme-parser.c (parse_draw_op_element): fix "colorize != NULL" to "colorize_spec != NULL" and free pixbuf on color spec failure * src/theme.c (colorize_pixbuf): minor reformatting, raise function calls out of inner loop, clamp r/g/b values to uchar range before assigning to uchar (draw_op_as_pixbuf): cache the colorized pixbuf (meta_draw_op_free): free the cache pixbuf
Diffstat (limited to 'src/theme-parser.c')
-rw-r--r--src/theme-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/theme-parser.c b/src/theme-parser.c
index 74a076f..12f43c0 100644
--- a/src/theme-parser.c
+++ b/src/theme-parser.c
@@ -2071,9 +2071,10 @@ parse_draw_op_element (GMarkupParseContext *context,
{
colorize_spec = meta_color_spec_new_from_string (colorize, error);
- if (colorize == NULL)
+ if (colorize_spec == NULL)
{
add_context_to_error (error, context);
+ g_object_unref (G_OBJECT (pixbuf));
return;
}
}