aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/devices.c6
-rw-r--r--modules/devices/printers.c2
2 files changed, 2 insertions, 6 deletions
diff --git a/modules/devices.c b/modules/devices.c
index 9aa88187..440e614a 100644
--- a/modules/devices.c
+++ b/modules/devices.c
@@ -20,10 +20,6 @@
#define __USE_XOPEN
#endif /* __USE_XOPEN */
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE
-#endif /* _XOPEN_SOURCE */
-
#include <gtk/gtk.h>
#include <config.h>
#include <string.h>
@@ -888,7 +884,7 @@ void hi_module_deinit(void)
sensor_shutdown();
storage_shutdown();
udisks2_shutdown();
- g_module_close(cups);
+ if(cups) g_module_close(cups);
}
const ModuleAbout *hi_module_get_about(void)
diff --git a/modules/devices/printers.c b/modules/devices/printers.c
index 25a6edd7..e849e1dc 100644
--- a/modules/devices/printers.c
+++ b/modules/devices/printers.c
@@ -67,7 +67,7 @@ init_cups(void)
if (!g_module_symbol(cups, "cupsGetDests", (gpointer) & cups_dests_get)
|| !g_module_symbol(cups, "cupsFreeDests", (gpointer) & cups_dests_free)) {
- g_module_close(cups);
+ if(cups) g_module_close(cups);
cups_init = FALSE;
}
}