libfeedback: Only cancel feedbacks if ever inited

If lfb_init() wasn't called before lfb_uninit() we'd otherwise raise a
critical which isn't nice for a library.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
Guido Günther
2025-03-25 21:55:34 +01:00
parent a0295286ff
commit e8ecc3d0c1
3 changed files with 46 additions and 11 deletions
+2 -1
View File
@@ -112,7 +112,8 @@ lfb_uninit (void)
_initted = FALSE;
/* Cancel all feedbacks that the client forgot to clean up */
lfb_cancel_feedbacks ();
if (_active_ids)
lfb_cancel_feedbacks ();
g_clear_pointer (&_active_ids, g_hash_table_destroy);
g_clear_pointer (&_app_id, g_free);
g_clear_object (&_proxy);