summaryrefslogtreecommitdiff
path: root/capplets/about-me/mate-about-me-password.c
diff options
context:
space:
mode:
authorValentin Villenave <[email protected]>2021-10-22 10:43:53 +0200
committermbkma <[email protected]>2021-11-08 21:01:49 +0100
commitf82acb016938a4177f64906a133c224a0b8c51be (patch)
treef38aec8d002391e0aca915e49377f578316d9b26 /capplets/about-me/mate-about-me-password.c
parent2794ea258a5b6acdcca4239cefdf5fbadfcb9e6e (diff)
downloadmate-control-center-f82acb016938a4177f64906a133c224a0b8c51be.tar.bz2
mate-control-center-f82acb016938a4177f64906a133c224a0b8c51be.tar.xz
g_queue_clear_full() is only available since glib 2.60.
Diffstat (limited to 'capplets/about-me/mate-about-me-password.c')
-rw-r--r--capplets/about-me/mate-about-me-password.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/capplets/about-me/mate-about-me-password.c b/capplets/about-me/mate-about-me-password.c
index fd7eb2d9..d03655a4 100644
--- a/capplets/about-me/mate-about-me-password.c
+++ b/capplets/about-me/mate-about-me-password.c
@@ -607,7 +607,13 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi
}
pdialog->backend_state = PASSWD_STATE_ERR;
/* Clean backen_stdin_queue if error occured */
- g_queue_clear_full(pdialog->backend_stdin_queue, g_free);
+#if GLIB_CHECK_VERSION(2, 60, 0)
+ g_queue_clear_full (pdialog->backend_stdin_queue, g_free);
+#else
+ /* TODO: Remove this if/when GLib compatibility gets dropped. */
+ g_queue_foreach (pdialog->backend_stdin_queue, (GFunc) g_free, NULL);
+ g_queue_clear (pdialog->backend_stdin_queue);
+#endif
g_free (msg);
}
break;