summaryrefslogtreecommitdiff
path: root/libpurple/idle.c
diff options
context:
space:
mode:
authorGary Kramlich <grim@reaperworld.com>2021-11-02 00:41:53 -0500
committerGary Kramlich <grim@reaperworld.com>2021-11-02 00:41:53 -0500
commit48b1d5b0796e2aa0456808326388c7a0cfdda48b (patch)
treeb0d1bf74dbb1b441d7ac13aa86e8c5015207c4e3 /libpurple/idle.c
parent8891bcc30ed6d36e69462d532ae01fc94df8596b (diff)
downloadpidgin-48b1d5b0796e2aa0456808326388c7a0cfdda48b.tar.gz
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/
Diffstat (limited to 'libpurple/idle.c')
-rw-r--r--libpurple/idle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpurple/idle.c b/libpurple/idle.c
index d8f7e55b72..a1288b69f6 100644
--- a/libpurple/idle.c
+++ b/libpurple/idle.c
@@ -286,6 +286,8 @@ purple_idle_set(time_t time)
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;
}