[gnome-text-editor] statusbar: check for self->vim pointer



commit b18299c9c2e718747efa206f0052d41998c54281
Author: Christian Hergert <christian hergert me>
Date:   Thu Dec 9 12:12:50 2021 -0800

    statusbar: check for self->vim pointer

 src/editor-statusbar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-statusbar.c b/src/editor-statusbar.c
index 4719eae..859c11f 100644
--- a/src/editor-statusbar.c
+++ b/src/editor-statusbar.c
@@ -301,7 +301,8 @@ editor_statusbar_bind_page (EditorStatusbar *self,
 
   if (page != NULL)
     {
-      vim = gtk_event_controller_key_get_im_context (GTK_EVENT_CONTROLLER_KEY (page->vim));
+      if (page->vim != NULL)
+        vim = gtk_event_controller_key_get_im_context (GTK_EVENT_CONTROLLER_KEY (page->vim));
       document = page->document;
     }
 


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