[gnome-software] snap: Don't crash on unknown snap types



commit b134d248b531cb3ca97274560cf5fd658dd22bf7
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Oct 26 13:56:43 2017 +1300

    snap: Don't crash on unknown snap types

 plugins/snap/gs-plugin-snap.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 60dffbe..a9272c6 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -293,7 +293,8 @@ snap_to_app (GsPlugin *plugin, SnapdSnap *snap)
                break;
         default:
        case SNAPD_SNAP_TYPE_UNKNOWN:
-                break;
+               unique_id = g_strdup_printf ("system/snap/*/*/%s/*", snapd_snap_get_name (snap));
+               break;
        }
 
        cached_app = gs_plugin_cache_lookup (plugin, unique_id);


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