1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

backend: egl: fix warning

This commit is contained in:
Yuxuan Shui 2022-11-27 18:07:05 +00:00
parent 552bf77d0e
commit 19a24ada9d
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -108,6 +108,7 @@ static bool egl_set_swap_interval(int interval, EGLDisplay dpy) {
*/
static backend_t *egl_init(session_t *ps) {
bool success = false;
struct egl_data *gd = NULL;
#define get_proc(name, type) \
name##Proc = (type)eglGetProcAddress(#name); \
@ -128,7 +129,7 @@ static backend_t *egl_init(session_t *ps) {
return NULL;
}
auto gd = ccalloc(1, struct egl_data);
gd = ccalloc(1, struct egl_data);
gd->display = eglGetPlatformDisplayProc(EGL_PLATFORM_X11_EXT, ps->dpy,
(EGLAttrib[]){
EGL_PLATFORM_X11_SCREEN_EXT,
@ -249,7 +250,9 @@ static backend_t *egl_init(session_t *ps) {
end:
if (!success) {
egl_deinit(&gd->gl.base);
if (gd != NULL) {
egl_deinit(&gd->gl.base);
}
return NULL;
}