summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common/utils.c')
-rw-r--r--src/mesa/drivers/dri/common/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 328f56b50d4..6d8cb4e29a6 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -409,6 +409,11 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a,
__DRIconfig **all;
int i, j, index;
+ if (a == NULL || a[0] == NULL)
+ return b;
+ else if (b == NULL || b[0] == NULL)
+ return a;
+
i = 0;
while (a[i] != NULL)
i++;