diff options
author | Richard Hughes <richard@hughsie.com> | 2013-12-10 09:21:33 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2013-12-10 09:21:33 +0000 |
commit | e7602b18193c1101661b3034da6ae5b81935a9fd (patch) | |
tree | fcb9625b8b1cae96de35de20430b83170a817f75 /contrib | |
parent | 078699ae23565b0f68b3381c165654b78793e58c (diff) | |
download | colord-e7602b18193c1101661b3034da6ae5b81935a9fd.tar.gz |
session-helper: Do not crash when moving the sensor position
Hopefully fixes: https://bugzilla.redhat.com/show_bug.cgi?id=973792
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/session-helper/cd-main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c index 6aa2826..9d35f2c 100644 --- a/contrib/session-helper/cd-main.c +++ b/contrib/session-helper/cd-main.c @@ -1488,6 +1488,7 @@ cd_main_start_calibration (CdMainPrivate *priv, cd_main_emit_interaction_required (priv, CD_SESSION_INTERACTION_MOVE_TO_CALIBRATION); g_error_free (error_local); + ret = TRUE; } else if (g_error_matches (error_local, CD_SENSOR_ERROR, CD_SENSOR_ERROR_REQUIRED_POSITION_SURFACE)) { @@ -1495,6 +1496,7 @@ cd_main_start_calibration (CdMainPrivate *priv, cd_main_emit_interaction_required (priv, CD_SESSION_INTERACTION_MOVE_TO_SURFACE); g_error_free (error_local); + ret = TRUE; } else { g_propagate_error (error, error_local); goto out; @@ -1562,6 +1564,10 @@ cd_main_start_calibration_cb (gpointer user_data) goto out; } + /* still waiting */ + if (priv->status == CD_SESSION_STATUS_WAITING_FOR_INTERACTION) + goto out; + /* success */ cd_main_emit_finished (priv, CD_SESSION_ERROR_NONE, NULL); g_timeout_add (200, cd_main_finished_quit_cb, priv); |