From b596fbbc375ea58aa2b869cb6025b2bb101f96b9 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 23 Apr 2002 16:22:25 +0000 Subject: * ext/stringio/stringio.c (strio_mark): must check if ptr is NULL first. [ruby-talk:38873] * lib/mkmf.rb (create_makefile): should print depend file when make is other than nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/stringio/stringio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/stringio/stringio.c') diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 11fe8ef455..07ee38dd48 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -53,7 +53,9 @@ static void strio_mark(ptr) struct StringIO *ptr; { - rb_gc_mark(ptr->string); + if (ptr) { + rb_gc_mark(ptr->string); + } } static void @@ -181,7 +183,6 @@ static VALUE strio_s_allocate(klass) VALUE klass; { - struct StringIO *ptr; return Data_Wrap_Struct(klass, strio_mark, strio_free, 0); } -- cgit v1.2.3