Make add_names return undef when called on undef
[gruntmaster-data.git] / lib / Gruntmaster / Data.pm
index 4393a62de6f687d724f8cab874b7e190cfd31283..7b6807959ec522affbcbc156f48f0a92292159d7 100644 (file)
@@ -75,6 +75,7 @@ sub object_name {
 
 sub add_names ($) { ## no critic (ProhibitSubroutinePrototypes)
        my ($el) = @_;
+       return unless defined $el;
        if (ref $el eq 'ARRAY') {
                &add_names ($_) for @$el ## no critic (ProhibitAmpersandSigils)
        } else {
This page took 0.009111 seconds and 4 git commands to generate.