[gnome-boxes/obsessive-compulsive-disorder: 4/11] remote-connection, assistant: Don't set entry URI when uri = null



commit 982382ba7175b99acb58f17981eca8947b948fd8
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Mar 26 11:14:40 2020 +0100

    remote-connection, assistant: Don't set entry URI when uri = null
    
    We support passing an URI to the Remote Connection assistant for
    handling command-line arguments and the remote connection mimetypes.
    
    When a GtkEntry text is set to null, Gtk raises a critical
    Gtk-CRITICAL **: 11:13:48.757: gtk_entry_set_text: assertion 'text != NULL' failed

 src/assistant/remote-connection.vala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/assistant/remote-connection.vala b/src/assistant/remote-connection.vala
index d9fc74aa..0bb270b7 100644
--- a/src/assistant/remote-connection.vala
+++ b/src/assistant/remote-connection.vala
@@ -24,7 +24,9 @@ public RemoteConnectionAssistant (AppWindow app_window, string? uri = null) {
         connect_button.clicked.connect (on_connect_button_clicked);
         connect_button.get_style_context ().add_class ("suggested-action");
 
-        url_entry.set_text (uri);
+        if (uri != null) {
+           url_entry.set_text (uri);
+        }
     }
 
     private void on_url_entry_changed () {


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