mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
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:

committed by
Sam Lantinga

parent
0bc370dfba
commit
bba066c44c
@@ -671,7 +671,9 @@ void SDL_DestroyTray(SDL_Tray *tray)
|
|||||||
SDL_RemovePath(tray->icon_path);
|
SDL_RemovePath(tray->icon_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref(tray->indicator);
|
if (tray->indicator) {
|
||||||
|
g_object_unref(tray->indicator);
|
||||||
|
}
|
||||||
|
|
||||||
SDL_free(tray);
|
SDL_free(tray);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user