From 8b1e7e34403977058d412931e31577df719fd2e4 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 25 May 1998 09:42:47 +0000 Subject: *** empty log message *** git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/curses/curses.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'ext/curses/curses.c') diff --git a/ext/curses/curses.c b/ext/curses/curses.c index ec7c6c6002..a2fbe182fa 100644 --- a/ext/curses/curses.c +++ b/ext/curses/curses.c @@ -333,7 +333,11 @@ curses_addstr(obj, str) VALUE obj; VALUE str; { - addstr(STR2CSTR(str)); + char *s = STR2CSTR(str); + + if (s) { + addstr(s); + } return Qnil; } @@ -681,11 +685,14 @@ window_addstr(obj, str) VALUE obj; VALUE str; { - struct windata *winp; - - GetWINDOW(obj, winp); - waddstr(winp->window, STR2CSTR(str)); - + char *s = STR2CSTR(str); + + if (s) { + struct windata *winp; + + GetWINDOW(obj, winp); + waddstr(winp->window, s); + } return Qnil; } -- cgit v1.2.3