[gnome-commander/gcmd-1-10] Check for null when default application name is selected
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-10] Check for null when default application name is selected
- Date: Thu, 14 May 2020 20:49:36 +0000 (UTC)
commit 547653dd023f00ada7d9dd2c4f786b815de166e0
Author: Uwe Scholz <u scholz83 gmx de>
Date: Fri May 1 16:32:59 2020 +0200
Check for null when default application name is selected
src/gnome-cmd-file-popmenu.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-popmenu.cc b/src/gnome-cmd-file-popmenu.cc
index 88512793..a242b30a 100644
--- a/src/gnome-cmd-file-popmenu.cc
+++ b/src/gnome-cmd-file-popmenu.cc
@@ -560,8 +560,8 @@ inline gchar *get_default_application_action_name (GList *files, gchar **icon_pa
auto f = static_cast<GnomeCmdFile*> (files->data);
auto uri_str = f->get_uri_str();
GnomeVFSMimeApplication *app = gnome_vfs_mime_get_default_application_for_uri (uri_str,
f->info->mime_type);
-
- if (icon_path)
+
+ if (icon_path && app)
{
GnomeCmdApp *gapp = gnome_cmd_app_new_from_vfs_app (app);
if (gapp)
@@ -572,7 +572,7 @@ inline gchar *get_default_application_action_name (GList *files, gchar **icon_pa
else
*icon_path = nullptr;
}
-
+
g_free (uri_str);
if (!app)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]