[gtk/wip/chergert/glproto: 51/94] add some precondition checks




commit fd1d44519efae9c0f8beb72f480912f811d95686
Author: Christian Hergert <chergert redhat com>
Date:   Sat Dec 26 14:52:14 2020 -0800

    add some precondition checks

 gsk/next/gskglcommandqueue.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gsk/next/gskglcommandqueue.c b/gsk/next/gskglcommandqueue.c
index 2810f008b9..056431d19e 100644
--- a/gsk/next/gskglcommandqueue.c
+++ b/gsk/next/gskglcommandqueue.c
@@ -698,6 +698,8 @@ gsk_gl_command_queue_set_uniform_matrix (GskGLCommandQueue       *self,
                                          const graphene_matrix_t *matrix)
 {
   g_return_if_fail (GSK_IS_GL_COMMAND_QUEUE (self));
+  g_return_if_fail (program > 0);
+  g_return_if_fail (matrix != NULL);
 
   gsk_gl_uniform_state_set_matrix (self->uniforms, program, location, matrix);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]