_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
+
+ if (!num_config)
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
+
ret = drv->API.GetConfigs(drv, disp, configs, config_size, num_config);
RETURN_EGL_EVAL(disp, ret);
_EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE);
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
+
+ if (!num_config)
+ RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
+
ret = drv->API.ChooseConfig(drv, disp, attrib_list, configs,
config_size, num_config);
_EGLConfig **configList;
EGLint i, count;
- if (!num_configs)
- return _eglError(EGL_BAD_PARAMETER, "eglChooseConfig");
-
/* get the number of matched configs */
count = _eglFilterArray(array, NULL, 0,
(_EGLArrayForEach) match, priv_data);
_eglGetConfigs(_EGLDriver *drv, _EGLDisplay *disp, EGLConfig *configs,
EGLint config_size, EGLint *num_config)
{
- if (!num_config)
- return _eglError(EGL_BAD_PARAMETER, "eglGetConfigs");
-
*num_config = _eglFlattenArray(disp->Configs, (void *) configs,
sizeof(configs[0]), config_size, _eglFlattenConfig);