Browse Source

Assertions

git-svn-id: https://klish.googlecode.com/svn/trunk@286 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 years ago
parent
commit
0ad3258672
2 changed files with 9 additions and 0 deletions
  1. 5 0
      clish/shell/shell__get_view.c
  2. 4 0
      clish/shell/shell__get_viewid.c

+ 5 - 0
clish/shell/shell__get_view.c

@@ -1,17 +1,22 @@
 /*
  * shell__get_view.c
  */
+
+#include <assert.h>
+
 #include "private.h"
 
 /*--------------------------------------------------------- */
 const clish_view_t *clish_shell__get_view(const clish_shell_t * this)
 {
+	assert(this);
 	return this->view;
 }
 
 /*--------------------------------------------------------- */
 unsigned clish_shell__get_depth(const clish_shell_t * this)
 {
+	assert(this);
 	return clish_view__get_depth(this->view);
 }
 

+ 4 - 0
clish/shell/shell__get_viewid.c

@@ -1,11 +1,15 @@
 /*
  * shell__get_viewid.c
  */
+
+#include <assert.h>
+
 #include "private.h"
 
 /*--------------------------------------------------------- */
 const char *clish_shell__get_viewid(const clish_shell_t * this)
 {
+	assert(this);
 	return this->viewid;
 }