summaryrefslogtreecommitdiff
path: root/contrib/session-helper
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-10-27 16:51:20 +0000
committerRichard Hughes <richard@hughsie.com>2014-10-27 17:01:44 +0000
commitda60b2f4578a81e4a99bc47a4f146a61cd8aef81 (patch)
treec9e71c28f6a50f7a9102971a738b80e2dcdc9284 /contrib/session-helper
parent484e92f0ed9445aec40eff0e067dc27bd9e3de92 (diff)
downloadcolord-da60b2f4578a81e4a99bc47a4f146a61cd8aef81.tar.gz
session-helper: Fix a crash in the session helper while calibrating
Diffstat (limited to 'contrib/session-helper')
-rw-r--r--contrib/session-helper/cd-main.c2
-rw-r--r--contrib/session-helper/cd-state.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c
index 5cd81d9..5b44305 100644
--- a/contrib/session-helper/cd-main.c
+++ b/contrib/session-helper/cd-main.c
@@ -1361,7 +1361,7 @@ cd_main_start_calibration (CdMainPrivate *priv,
CD_SESSION_INTERACTION_MOVE_TO_SURFACE);
return TRUE;
}
- g_propagate_error (error, error_local);
+ *error = g_error_copy (error_local);
return FALSE;
}
diff --git a/contrib/session-helper/cd-state.c b/contrib/session-helper/cd-state.c
index 0ff68e6..e0b2a06 100644
--- a/contrib/session-helper/cd-state.c
+++ b/contrib/session-helper/cd-state.c
@@ -470,7 +470,7 @@ cd_state_show_profile (CdState *state)
gdouble total_time = 0.0f;
guint i;
guint uncumalitive = 0;
- _cleanup_string_free_ GString *result;
+ _cleanup_string_free_ GString *result = NULL;
/* get the total time so we can work out the divisor */
for (i = 0; i < state->priv->steps; i++)
@@ -492,7 +492,6 @@ cd_state_show_profile (CdState *state)
state->priv->step_profile[i] / division);
}
g_printerr ("\n\n%s-1 ] at %s\n\n", result->str, state->priv->id);
- g_string_free (result, TRUE);
}
/**