[gnome-software] trivial: Don't crash when installing a web-app



commit de6efe7bbec13ea14fdc6d77596f9c9ee5b1db27
Author: Richard Hughes <richard hughsie com>
Date:   Fri Mar 8 15:00:37 2019 +0000

    trivial: Don't crash when installing a web-app
    
    Although this isn't the root of the problem, it at least makes the crash go away.

 plugins/epiphany/gs-plugin-epiphany.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index 98eb4bc7..50e33f1f 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -109,6 +109,14 @@ gs_plugin_app_install (GsPlugin *plugin, GsApp *app,
                return FALSE;
        }
        icon = g_ptr_array_index (icons, 0);
+       if (as_icon_get_filename (icon) == NULL) {
+               g_set_error (error,
+                            GS_PLUGIN_ERROR,
+                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
+                            "no filename for icon %s",
+                            as_icon_get_name (icon));
+               return FALSE;
+       }
        ret = g_file_make_symbolic_link (symlink_icon,
                                         as_icon_get_filename (icon),
                                         NULL,


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