[gnome-software] fwupd: Don't crash if when getting the locked status



commit e156ca9ce1515d27ef51e9fed741e1eac3ab3816
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jul 18 11:48:22 2018 +0100

    fwupd: Don't crash if when getting the locked status

 plugins/fwupd/gs-fwupd-app.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
index 1efead4a..e911a4a1 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -41,6 +41,8 @@ gboolean
 gs_fwupd_app_get_is_locked (GsApp *app)
 {
        GVariant *tmp = gs_app_get_metadata_variant (app, "fwupd::IsLocked");
+       if (tmp == NULL)
+               return FALSE;
        return g_variant_get_boolean (tmp);
 }
 


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