[gnome-commander] add null check



commit a235c107e33b6e0aebca4637e0b0f63ed72ee25d
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Mon Nov 8 21:55:43 2021 +0100

    add null check

 src/dialogs/gnome-cmd-con-dialog.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-con-dialog.cc b/src/dialogs/gnome-cmd-con-dialog.cc
index 38d99bed..8c5d9c91 100644
--- a/src/dialogs/gnome-cmd-con-dialog.cc
+++ b/src/dialogs/gnome-cmd-con-dialog.cc
@@ -596,8 +596,10 @@ gboolean gnome_cmd_connect_dialog_edit (GnomeCmdConRemote *server)
             else
             {
 #endif
-                gtk_entry_set_text (GTK_ENTRY (dialog->priv->folder_entry), path);
-                gtk_entry_set_text (GTK_ENTRY (dialog->priv->user_entry), user_name);
+                if (path)
+                    gtk_entry_set_text (GTK_ENTRY (dialog->priv->folder_entry), path);
+                if (user_name)
+                    gtk_entry_set_text (GTK_ENTRY (dialog->priv->user_entry), user_name);
 #ifdef HAVE_SAMBA
             }
 #endif


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