git.psu.edu will be upgraded to critical security release 13.7.4 Monday, 11/18 between 9 and 10pm. Please email support@git.psu.edu if you have trouble with anything Gitlab-related. Please see the git.psu.edu Yammer group for more information.

Commit 8919b596 authored by Andy Cobaugh's avatar Andy Cobaugh

wait: avoid potential panic in case v is nil

parent beeccafa
Pipeline #106208 passed with stage
in 20 seconds
......@@ -225,7 +225,7 @@ func ciWaitVersionCompare(initialBody []byte, newBody []byte, commit string, ver
// look for long commit, comparing the first len(commit) characters
if commit != "" {
for _, k := range ciWaitCommitFields {
if v := nb[k]; v != "" {
if v := nb[k]; v != "" && v != nil {
l := len(v.(string))
if len(commit) >= l {
return v == commit[:l]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment