diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-02-08 04:15:22 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-02-08 04:15:22 +0100 |
commit | 4c888034f8117aa34d289f93e7f21ca1fcf67bea (patch) | |
tree | 88c75b2634147417ed85ae374895120d9a01ab0d | |
parent | c454b179994110077399eb5e2cce6e082d8780d2 (diff) | |
download | sensei-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.c | 12 |
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[]; |