t/test.pl: Don't read uninitialized variable
authorKarl Williamson <public@khwilliamson.com>
Sat, 15 Feb 2014 23:11:55 +0000 (16:11 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sat, 15 Feb 2014 23:13:40 +0000 (16:13 -0700)
Commit 97dffe50643dd18f87b33b7ec6f8b55bbfd1fd74 introduced
an attempt to access an unitialized hash value.

t/test.pl

index 152c796..15282ca 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -681,7 +681,7 @@ sub _create_runperl { # Create the string to qx in runperl().
     if (defined $args{args}) {
        $runperl = _quote_args($runperl, $args{args});
     }
-    if ($args{stderr} eq 'devnull') {
+    if (exists $args{stderr} && $args{stderr} eq 'devnull') {
         $runperl = $runperl . ($is_mswin ? ' 2>nul' : ' 2>/dev/null');
     }
     elsif ($args{stderr}) {