[gnome-commander] Check if gFile is not null
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Check if gFile is not null
- Date: Sat, 9 Oct 2021 10:00:34 +0000 (UTC)
commit 5dc92c55dee7e6e7f73290db575c2edb9ba7dbcf
Author: Uwe Scholz <u scholz83 gmx de>
Date: Wed Oct 6 21:21:05 2021 +0200
Check if gFile is not null
src/gnome-cmd-con.cc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index bd7aad3c..d3d34862 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -489,9 +489,10 @@ gboolean gnome_cmd_con_get_path_target_type (GnomeCmdCon *con, const gchar *path
GnomeCmdPath *path = gnome_cmd_con_create_path (con, path_str);
auto gFile = gnome_cmd_con_create_gfile(con, path);
- if (!g_file_query_exists(gFile, nullptr))
+ if (!gFile || !g_file_query_exists(gFile, nullptr))
{
- g_object_unref(gFile);
+ if (!gFile)
+ g_object_unref(gFile);
*gFileType = G_FILE_TYPE_UNKNOWN;
delete path;
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]