diff options
author | Chia-I Wu <[email protected]> | 2011-09-21 10:48:21 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-09-21 12:01:03 +0800 |
commit | ceb6d34906c7c03c102c7e78dd02f5b0ebab4ca9 (patch) | |
tree | 061792f65d8f8c0daffeabd24ee0be8531fba533 /src/gallium/state_trackers/vega/text.c | |
parent | bdddf1cc26541d730bac309bd63dfdcaf4aea513 (diff) |
st/vega: fix vg_context_is_object_valid()
vg_context_is_object_valid() checks if a handle is valid by checking if
the handle is a valid key of the object hash table. However, the keys
of the object hash table were object pointers.
Fix vg_context_add_object() to use the handles as the keys so that
vg_context_is_object_valid() works. This bug was introduced by
99c67f27d35a4bbbbefada8117d5972c7583cf42.
Diffstat (limited to 'src/gallium/state_trackers/vega/text.c')
-rw-r--r-- | src/gallium/state_trackers/vega/text.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/text.c b/src/gallium/state_trackers/vega/text.c index 6714ee9ad35..a183933c364 100644 --- a/src/gallium/state_trackers/vega/text.c +++ b/src/gallium/state_trackers/vega/text.c @@ -138,7 +138,7 @@ struct vg_font *font_create(VGint glyphCapacityHint) vg_init_object(&font->base, ctx, VG_OBJECT_FONT); font->glyphs = cso_hash_create(); - vg_context_add_object(ctx, VG_OBJECT_FONT, font); + vg_context_add_object(ctx, &font->base); return font; } @@ -148,7 +148,7 @@ void font_destroy(struct vg_font *font) struct vg_context *ctx = vg_current_context(); struct cso_hash_iter iter; - vg_context_remove_object(ctx, VG_OBJECT_FONT, font); + vg_context_remove_object(ctx, &font->base); iter = cso_hash_first_node(font->glyphs); while (!cso_hash_iter_is_null(iter)) { |