review some possible nil error panics (#20518)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
00016e3a4f
Коммит
4b5d56a8c2
@@ -58,7 +58,7 @@ func (p *MyPlugin) MessageWillBePosted(_ *plugin.Context, _ *model.Post) (*model
|
||||
byteReader := bytes.NewReader(imageProfile)
|
||||
img2, _, err2 := image.Decode(byteReader)
|
||||
if err2 != nil {
|
||||
return nil, err.Error()
|
||||
return nil, err2.Error()
|
||||
}
|
||||
if img2.At(2, 3) != colorful {
|
||||
return nil, fmt.Sprintf("color mismatch %v != %v", img2.At(2, 3), colorful)
|
||||
|
||||
Ссылка в новой задаче
Block a user