tray: Don't call g_object_unref(NULL)

g_object_unref() only accepts valid object instances.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2025-01-07 20:35:06 +00:00 committed by Sam Lantinga
parent 0bc370dfba
commit bba066c44c

View file

@ -671,7 +671,9 @@ void SDL_DestroyTray(SDL_Tray *tray)
SDL_RemovePath(tray->icon_path); SDL_RemovePath(tray->icon_path);
} }
if (tray->indicator) {
g_object_unref(tray->indicator); g_object_unref(tray->indicator);
}
SDL_free(tray); SDL_free(tray);