diff --git a/go/images/orientation.go b/go/images/orientation.go index a7c126fc1..41ed3f0af 100644 --- a/go/images/orientation.go +++ b/go/images/orientation.go @@ -21,7 +21,10 @@ func FixJpgOrientation(data []byte) (oriented []byte) { } angle := 0 flipMode := FlipDirection(0) - orient := tag.Int(0) + orient, err := tag.Int(0) + if err != nil { + return data + } switch orient { case topLeftSide: // do nothing