[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: Wed, 27 Jan 2021 20:49:53 +0000 (UTC)
commit d5f22b2c14b51d79ce902a84d5f3dfaad0aeda16
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 27 12:41:12 2021 -0800
more assertions
gsk/next/gskgluniformstate.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gsk/next/gskgluniformstate.c b/gsk/next/gskgluniformstate.c
index 65679c6615..6fb89ab7a3 100644
--- a/gsk/next/gskgluniformstate.c
+++ b/gsk/next/gskgluniformstate.c
@@ -194,6 +194,7 @@ get_uniform (GskGLUniformState *state,
g_assert (array_count < 256);
g_assert ((int)format >= 0 && format < GSK_GL_UNIFORM_FORMAT_LAST);
g_assert (location < GL_MAX_UNIFORM_LOCATIONS);
+ g_assert (format > 0);
/* Fast path for common case (state already initialized) */
if G_LIKELY (program < state->program_info->len &&
@@ -259,6 +260,8 @@ setup_info:
info->offset = offset;
info->array_count = array_count;
+ g_assert (info->initial == TRUE);
+
*infoptr = info;
return state->uniform_data->data + offset;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]