[gtk/wip/chergert/glproto] more assertions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/glproto] more assertions
- Date: Mon, 15 Feb 2021 19:50:07 +0000 (UTC)
commit b993103413baabc81996831dca0f85d71ff24f59
Author: Christian Hergert <chergert redhat com>
Date: Sat Feb 13 11:51:03 2021 -0800
more assertions
gsk/next/gskglcommandqueue.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index d1bea6cc46..85e4c32170 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -391,6 +391,10 @@ gsk_gl_command_queue_uniform_snapshot_cb (const GskGLUniformInfo *info,
{
GArray *uniforms = user_data;
+ g_assert (info != NULL);
+ g_assert (info->format > 0);
+ g_assert (location < GL_MAX_UNIFORM_LOCATIONS);
+
/* To avoid calling g_array_set_size() a bunch in this callback,
* we've already "set_size()" before the callback was called and
* so we can instead be certain the size is large enough and use
@@ -662,6 +666,10 @@ apply_uniform (gconstpointer dataptr,
GskGLUniformInfo info,
guint location)
{
+ g_assert (dataptr != NULL);
+ g_assert (info.format > 0);
+ g_assert (location < GL_MAX_UNIFORM_LOCATIONS);
+
switch (info.format)
{
case GSK_GL_UNIFORM_FORMAT_1F:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]