check_sha1_signature: check return value from read_istream
[gitweb.git] / git-difftool.perl
index 0a90de414646b901e13abbf89aa78ae71e8b12f0..12231fbc6708971f6350006c710124bd369de7ab 100755 (executable)
@@ -336,7 +336,7 @@ sub main
        }
        if ($opts{gui}) {
                my $guitool = Git::config('diff.guitool');
-               if (length($guitool) > 0) {
+               if (defined($guitool) && length($guitool) > 0) {
                        $ENV{GIT_DIFF_TOOL} = $guitool;
                }
        }