[gtksourceview/wip/chergert/vim: 38/73] check type




commit 577e96be572c1fd3bb240ea7efb9997d8696939e
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 22 11:29:03 2021 -0700

    check type

 gtksourceview/vim/gtk-source-vim.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtksourceview/vim/gtk-source-vim.c b/gtksourceview/vim/gtk-source-vim.c
index 306ac300..b7f29637 100644
--- a/gtksourceview/vim/gtk-source-vim.c
+++ b/gtksourceview/vim/gtk-source-vim.c
@@ -21,6 +21,8 @@
 
 #include "config.h"
 
+#include "gtksourceview.h"
+
 #include "gtk-source-vim.h"
 #include "gtk-source-vim-command-bar.h"
 #include "gtk-source-vim-normal.h"
@@ -50,6 +52,8 @@ static guint signals[N_SIGNALS];
 GtkSourceVim *
 gtk_source_vim_new (GtkSourceView *view)
 {
+       g_return_val_if_fail (GTK_SOURCE_IS_VIEW (view), NULL);
+
        return g_object_new (GTK_SOURCE_TYPE_VIM,
                             "view", view,
                             NULL);


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