--- rxvt-unicode/src/rxvtperl.xs 2006/01/16 08:48:09 1.68 +++ rxvt-unicode/src/rxvtperl.xs 2006/01/17 09:34:21 1.70 @@ -41,7 +41,7 @@ #include "perlxsi.c" -#if defined(HAVE_SCROLLBARS) || defined(MENUBAR) +#ifdef HAVE_SCROLLBARS # define GRAB_CURSOR THIS->leftptr_cursor #else # define GRAB_CURSOR None @@ -442,9 +442,12 @@ rxvt_pop_locale (); } - // runs outside of perls ENV - term->perl.self = (void *)newSVptr ((void *)term, "urxvt::term"); - hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newHV ()), 0); + if (perl) + { + // runs outside of perls ENV + term->perl.self = (void *)newSVptr ((void *)term, "urxvt::term"); + hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newHV ()), 0); + } } static void