Fix RT#59738, show_internal_actions produces warnings in debug mode
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index e310bd8..56ed57f 100644 (file)
@@ -1701,7 +1701,7 @@ sub _stats_start_execute {
         my $parent = $c->stack->[-1];
 
         # forward, locate the caller
-        if ( exists $c->counter->{"$parent"} ) {
+        if ( defined $parent && exists $c->counter->{"$parent"} ) {
             $c->stats->profile(
                 begin  => $action,
                 parent => "$parent" . $c->counter->{"$parent"},