From: Florian Ragwitz Date: Sun, 19 Oct 2008 17:23:19 +0000 (+0000) Subject: Don't segfault if HvNAME(PL_curstash) == NULL. X-Git-Tag: 0.005000~59 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9603b8dc4de630701f2c9c60087a99ab28045044;p=p5sagit%2FDevel-Declare.git Don't segfault if HvNAME(PL_curstash) == NULL. --- diff --git a/Declare.xs b/Declare.xs index db84e25..78177fb 100644 --- a/Declare.xs +++ b/Declare.xs @@ -51,6 +51,9 @@ int dd_is_declarator(pTHX_ char* name) { /* $declarators{$current_package_name} */ + if (!HvNAME(PL_curstash)) + return -1; + is_declarator_pack_ref = hv_fetch(is_declarator, HvNAME(PL_curstash), strlen(HvNAME(PL_curstash)), FALSE);