From 0e112c3371050c727cfc37da093650a95b0048a4 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 18 Nov 2009 13:23:10 +0000 Subject: [PATCH] cogl: Add the missing terminators for the arrays of feature functions _cogl_feature_check expects the array of function names to be terminated with a NULL pointer but I forgot to add this. This was causing crashes depending on what happened to be in memory after the array. --- cogl/driver/gl/cogl.c | 1 + cogl/driver/gles/cogl.c | 1 + 2 files changed, 2 insertions(+) diff --git a/cogl/driver/gl/cogl.c b/cogl/driver/gl/cogl.c index 87b5c2f47..1e40c5f38 100644 --- a/cogl/driver/gl/cogl.c +++ b/cogl/driver/gl/cogl.c @@ -175,6 +175,7 @@ _cogl_check_driver_valid (GError **error) #define COGL_FEATURE_FUNCTION(ret, name, args) \ { G_STRINGIFY (name), G_STRUCT_OFFSET (CoglContext, drv.pf_ ## name) }, #define COGL_FEATURE_END() \ + { NULL, 0 }, \ }; #include "cogl-feature-functions.h" diff --git a/cogl/driver/gles/cogl.c b/cogl/driver/gles/cogl.c index 0e63bad3f..21d5c268f 100644 --- a/cogl/driver/gles/cogl.c +++ b/cogl/driver/gles/cogl.c @@ -72,6 +72,7 @@ _cogl_check_driver_valid (GError **error) #define COGL_FEATURE_FUNCTION(ret, name, args) \ { G_STRINGIFY (name), G_STRUCT_OFFSET (CoglContext, drv.pf_ ## name) }, #define COGL_FEATURE_END() \ + { NULL, 0 }, \ }; #include "cogl-feature-functions.h"