summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sbmanager.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/sbmanager.c b/src/sbmanager.c
index d2130c4..23707bf 100644
--- a/src/sbmanager.c
+++ b/src/sbmanager.c
@@ -1182,6 +1182,12 @@ static gboolean gui_pages_init_cb(gpointer data)
if (!sbc)
sbc = device_sbs_new(app->uuid, &error);
+ if (error) {
+ g_printerr("%s", error->message);
+ g_error_free(error);
+ error = NULL;
+ }
+
if (sbc) {
/* Load icon data */
if (device_sbs_get_iconstate(sbc, &iconstate, &error)) {
@@ -1190,6 +1196,12 @@ static gboolean gui_pages_init_cb(gpointer data)
}
}
+ if (error) {
+ g_printerr("%s", error->message);
+ g_error_free(error);
+ error = NULL;
+ }
+
clutter_threads_add_timeout(500, (GSourceFunc)wait_icon_load_finished, NULL);
return FALSE;
@@ -1209,13 +1221,27 @@ static gboolean set_icon_state_cb(gpointer user_data)
plist_t iconstate = gui_get_iconstate();
if (iconstate) {
GError *error = NULL;
+
if (!sbc)
sbc = device_sbs_new(app->uuid, &error);
+
+ if (error) {
+ g_printerr("%s", error->message);
+ g_error_free(error);
+ error = NULL;
+ }
+
if (sbc) {
device_sbs_set_iconstate(sbc, iconstate, &error);
device_sbs_free(sbc);
plist_free(iconstate);
}
+
+ if (error) {
+ g_printerr("%s", error->message);
+ g_error_free(error);
+ error = NULL;
+ }
}
return FALSE;
}