Skip to content

Commit

Permalink
egl-wayland: Fix potential null-pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
Molytho authored and erik-kz committed Jan 19, 2024
1 parent 11386cc commit 369b337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wayland-egldisplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ EGLDisplay wlEglGetPlatformDisplayExport(void *data,
free(eglDeviceList);
free(protocols.drm_name);

if (display->ownNativeDpy) {
if (display && display->ownNativeDpy) {
wl_display_disconnect(display->nativeDpy);
}
free(display);
Expand Down

0 comments on commit 369b337

Please sign in to comment.