summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2011-05-12 19:30:05 +0200
committerKristian Høgsberg <[email protected]>2011-05-13 09:31:09 -0400
commit83c68758be3589edeab4d20346388241dc2ebaac (patch)
treedb77834480f074e2622f0bca7ed7d0fe45acb1fc /src/egl
parent93aea63a33c575bbce80acad391e810acc2f3e94 (diff)
egl_dri2: Discard similar configs
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 10309e6eeaf..ea8c8fba8c0 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -200,10 +200,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
else if (!double_buffer && !conf->dri_single_config)
conf->dri_single_config = dri_config;
else
- /* a similar config type is already added
- * => attach it as new config
- */
- num_configs = 0;
+ /* a similar config type is already added (unlikely) => discard */
+ return NULL;
}
else if (num_configs == 0) {
conf = malloc(sizeof *conf);