[gnome-mud] Fix crash when hitting enter in input box without a connection



commit c1f6add1eb018efd9ec85f357b25ac90ed5d70d8
Author: Mart Raudsepp <leio gentoo org>
Date:   Fri Jan 4 02:10:50 2019 +0200

    Fix crash when hitting enter in input box without a connection

 src/mud-window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/mud-window.c b/src/mud-window.c
index ec46323..1542270 100644
--- a/src/mud-window.c
+++ b/src/mud-window.c
@@ -612,7 +612,7 @@ mud_window_textview_keypress(GtkWidget *widget, GdkEventKey *event, MudWindow *s
             g_free(text);
         }
 
-        if (g_settings_get_boolean(self->priv->current_view->profile->settings, "keep-text"))
+        if ((self->priv->current_view != NULL) && 
g_settings_get_boolean(self->priv->current_view->profile->settings, "keep-text"))
             gtk_text_buffer_select_range(buffer, &start, &end);
         else
             gtk_text_buffer_delete(buffer, &start, &end);


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