mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Wayland: Fix possible segfault on drag enter
Found with Clang static analysis.
This commit is contained in:
@@ -1986,7 +1986,7 @@ static void dataDeviceHandleEnter(void* userData,
|
||||
window = wl_surface_get_user_data(surface);
|
||||
}
|
||||
|
||||
if (surface == window->wl.surface && _glfw.wl.offers[i].text_uri_list)
|
||||
if (window && surface == window->wl.surface && _glfw.wl.offers[i].text_uri_list)
|
||||
{
|
||||
_glfw.wl.dragOffer = offer;
|
||||
_glfw.wl.dragFocus = window;
|
||||
|
||||
Reference in New Issue
Block a user