[gnome-software] GsApp: Avoid crashing on kind changes on "core" apps



commit 24e4965453c104eb8f65b46e23fafdac4e66a98f
Author: Kalev Lember <kalevlember gmail com>
Date:   Tue Sep 16 00:26:13 2014 +0200

    GsApp: Avoid crashing on kind changes on "core" apps
    
    Handle newly added GS_APP_KIND_CORE enum in gs_app_set_kind. It doesn't
    make sense for these to change their kind, but instead of crashing just
    log a warning.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736362

 src/gs-app.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 13b26c9..fe6a35c 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -543,6 +543,7 @@ gs_app_set_kind (GsApp *app, GsAppKind kind)
                break;
        case GS_APP_KIND_SYSTEM:
        case GS_APP_KIND_OS_UPDATE:
+       case GS_APP_KIND_CORE:
        case GS_APP_KIND_SOURCE:
        case GS_APP_KIND_MISSING:
                /* this can never change state */


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