summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-02-08 04:15:22 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-02-08 04:15:22 +0100
commit4c888034f8117aa34d289f93e7f21ca1fcf67bea (patch)
tree88c75b2634147417ed85ae374895120d9a01ab0d
parentc454b179994110077399eb5e2cce6e082d8780d2 (diff)
downloadsensei-raw-ctl-4c888034f8117aa34d289f93e7f21ca1fcf67bea.tar.gz
sensei-raw-ctl-4c888034f8117aa34d289f93e7f21ca1fcf67bea.tar.xz
sensei-raw-ctl-4c888034f8117aa34d289f93e7f21ca1fcf67bea.zip
Try to fix build with older GLib
-rw-r--r--sensei-raw-ctl-gui.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sensei-raw-ctl-gui.c b/sensei-raw-ctl-gui.c
index 01d1e62..3a7de24 100644
--- a/sensei-raw-ctl-gui.c
+++ b/sensei-raw-ctl-gui.c
@@ -29,6 +29,18 @@
#include "config.h"
+#if ! GLIB_CHECK_VERSION (2, 34, 0)
+static void
+g_clear_pointer (void **pointer, void (*destroy) (void *))
+{
+ if (*pointer)
+ {
+ destroy (*pointer);
+ *pointer = NULL;
+ }
+}
+#endif // ! GLIB_CHECK_VERSION (2, 34)
+
/** User interface string for GtkBuilder. */
extern const char ui[];