[cogl/issue-14] Free state after freeing its contents
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/issue-14] Free state after freeing its contents
- Date: Thu, 4 Jun 2020 11:54:42 +0000 (UTC)
commit bcc0d79ce0f502ce0cf60afd8bfd4dcfd41bcb1d
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jun 4 12:50:25 2020 +0100
Free state after freeing its contents
We are freeing the big state inside the CoglPipeline before freeing the
snippets list, even though the snippets are stored in the big state.
Fixes: #14
cogl/cogl-pipeline.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c
index b2fee10d..e8d6e97d 100644
--- a/cogl/cogl-pipeline.c
+++ b/cogl/cogl-pipeline.c
@@ -492,9 +492,6 @@ _cogl_pipeline_free (CoglPipeline *pipeline)
_cogl_bitmask_destroy (&uniforms_state->changed_mask);
}
- if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
- g_slice_free (CoglPipelineBigState, pipeline->big_state);
-
if (pipeline->differences & COGL_PIPELINE_STATE_LAYERS)
{
g_list_foreach (pipeline->layer_differences,
@@ -508,6 +505,9 @@ _cogl_pipeline_free (CoglPipeline *pipeline)
if (pipeline->differences & COGL_PIPELINE_STATE_FRAGMENT_SNIPPETS)
_cogl_pipeline_snippet_list_free (&pipeline->big_state->fragment_snippets);
+ if (pipeline->differences & COGL_PIPELINE_STATE_NEEDS_BIG_STATE)
+ g_slice_free (CoglPipelineBigState, pipeline->big_state);
+
g_list_free (pipeline->deprecated_get_layers_list);
recursively_free_layer_caches (pipeline);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]