[gnome-software] Do not assert when the app state changes from 'unavailable' to 'available'



commit e4c15e43b04dfebd0db09a7682e970fce19a3907
Author: Richard Hughes <richard hughsie com>
Date:   Tue Oct 29 17:33:06 2013 +0000

    Do not assert when the app state changes from 'unavailable' to 'available'

 src/gs-app.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 2ff212a..658882f 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -409,6 +409,12 @@ gs_app_set_state (GsApp *app, GsAppState state)
                    state == GS_APP_STATE_REMOVING)
                        state_change_ok = TRUE;
                break;
+       case GS_APP_STATE_UNAVAILABLE:
+               /* updatable has to go into an action state */
+               if (state == GS_APP_STATE_UNKNOWN ||
+                   state == GS_APP_STATE_AVAILABLE)
+                       state_change_ok = TRUE;
+               break;
        default:
                g_warning ("state %s unhandled",
                           gs_app_state_to_string (priv->state));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]