examples: glyphs: fix double-free of texture

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-05-07 22:26:59 -07:00 committed by Stephen Gutekanst
parent 6feaad630e
commit 3d4888f430

View file

@ -69,6 +69,7 @@ fn afterInit(
// Create a sprite rendering pipeline
const texture = glyphs.state().texture;
const pipeline = try entities.new();
texture.reference();
try sprite_pipeline.set(pipeline, .texture, texture);
sprite_pipeline.send(.update, .{});