From dade472fb2afe5809fae308df7b86333db77e8f7 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Fri, 5 Nov 2004 02:49:10 +0000 Subject: [PATCH] fix for null-reference 1038359 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6672 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/perl5/typemaps.i | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/perl5/typemaps.i b/Lib/perl5/typemaps.i index 3341480ba..98b932d87 100644 --- a/Lib/perl5/typemaps.i +++ b/Lib/perl5/typemaps.i @@ -533,6 +533,7 @@ as follows : { SV *tempsv; tempsv = SvRV($arg); + if (!$1) SWIG_croak("expected a reference"); sv_setnv(tempsv, (double) *$1); } @@ -544,6 +545,7 @@ as follows : { SV *tempsv; tempsv = SvRV($input); + if (!$1) SWIG_croak("expected a reference"); sv_setiv(tempsv, (IV) *$1); } @@ -554,6 +556,7 @@ as follows : { SV *tempsv; tempsv = SvRV($input); + if (!$1) SWIG_croak("expected a reference"); sv_setuv(tempsv, (UV) *$1); }