summaryrefslogtreecommitdiffstats
path: root/vendor/google.golang.org/protobuf/internal/order/order.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/protobuf/internal/order/order.go')
-rw-r--r--vendor/google.golang.org/protobuf/internal/order/order.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/google.golang.org/protobuf/internal/order/order.go b/vendor/google.golang.org/protobuf/internal/order/order.go
index 33745ed0..dea522e1 100644
--- a/vendor/google.golang.org/protobuf/internal/order/order.go
+++ b/vendor/google.golang.org/protobuf/internal/order/order.go
@@ -33,7 +33,7 @@ var (
return !inOneof(ox) && inOneof(oy)
}
// Fields in disjoint oneof sets are sorted by declaration index.
- if ox != nil && oy != nil && ox != oy {
+ if inOneof(ox) && inOneof(oy) && ox != oy {
return ox.Index() < oy.Index()
}
// Fields sorted by field number.