diff --git a/src/video/wayland/SDL_waylanddatamanager.c b/src/video/wayland/SDL_waylanddatamanager.c index 3f4c0a2857..61928f4f6b 100644 --- a/src/video/wayland/SDL_waylanddatamanager.c +++ b/src/video/wayland/SDL_waylanddatamanager.c @@ -393,6 +393,7 @@ static void Wayland_data_offer_check_source(SDL_WaylandDataOffer *offer, const c if (!offer) { SDL_SetError("Invalid data offer"); + return; } data_device = offer->data_device; if (!data_device) {