[gtk/wip/chergert/glproto: 596/920] be safer about clearing things even if we error
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto: 596/920] be safer about clearing things even if we error
- Date: Mon, 8 Feb 2021 19:15:31 +0000 (UTC)
commit 9275ee6381c0c502a7fe937a80508c168c54da9f
Author: Christian Hergert <chergert redhat com>
Date: Tue Dec 29 10:26:21 2020 -0800
be safer about clearing things even if we error
gsk/next/gskglcompiler.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gsk/next/gskglcompiler.c b/gsk/next/gskglcompiler.c
index d47edab28c..9c3038634f 100644
--- a/gsk/next/gskglcompiler.c
+++ b/gsk/next/gskglcompiler.c
@@ -266,6 +266,9 @@ gsk_gl_compiler_set_source (GskGLCompiler *self,
GBytes *fragment_bytes;
GBytes *vertex_bytes;
+ g_clear_pointer (&self->fragment_source, g_bytes_unref);
+ g_clear_pointer (&self->vertex_source, g_bytes_unref);
+
source = g_bytes_get_data (source_bytes, &len);
endpos = source + len;
vertex_shader_start = g_strstr_len (source, len, "VERTEX_SHADER");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]