From 7d2dbe3670f2fd960d290b1304eb374f20fbb4e8 Mon Sep 17 00:00:00 2001 From: Viktor Gal Date: Sat, 1 Feb 2020 11:25:30 +0100 Subject: [PATCH] fix #1199 --- Lib/ruby/rubyrun.swg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/ruby/rubyrun.swg b/Lib/ruby/rubyrun.swg index 4b2ffe4b4..3b6fd32b0 100644 --- a/Lib/ruby/rubyrun.swg +++ b/Lib/ruby/rubyrun.swg @@ -235,6 +235,8 @@ SWIGRUNTIMEINLINE char * SWIG_Ruby_MangleStr(VALUE obj) { VALUE stype = rb_iv_get(obj, "@__swigtype__"); + if (NIL_P(stype)) + return NULL; return StringValuePtr(stype); }