grim/pidgin

d12bedb8b662
Parents 2b4446ccebc9
Children 91c9fc1f1db3
Check that we have a PurpleIdleUi if we weren't passed null

Testing Done:
Ran a simple python test program to verify that this was working properly.

Reviewed at https://reviews.imfreedom.org/r/1120/
--- a/libpurple/idle.c Tue Nov 02 00:41:03 2021 -0500
+++ b/libpurple/idle.c Tue Nov 02 00:41:53 2021 -0500
@@ -286,6 +286,8 @@
void
purple_idle_set_ui(PurpleIdleUi *ui) {
+ g_return_if_fail(ui == NULL || PURPLE_IS_IDLE_UI(ui));
+
g_clear_object(&idle_ui);
idle_ui = ui;
}