From 119786b317f6e89037b84d0369b78a211fd4fa98 Mon Sep 17 00:00:00 2001 From: amandahla Date: Thu, 23 Nov 2017 10:33:24 -0200 Subject: [PATCH] Fix #933 --- property/collector.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/property/collector.go b/property/collector.go index 04a9e7737..ccf712cf9 100644 --- a/property/collector.go +++ b/property/collector.go @@ -121,6 +121,10 @@ func (p *Collector) RetrieveProperties(ctx context.Context, req types.RetrievePr // of the specified managed objects, with the relevant properties filled in. If // the properties slice is nil, all properties are loaded. func (p *Collector) Retrieve(ctx context.Context, objs []types.ManagedObjectReference, ps []string, dst interface{}) error { + if len(objs) == 0 { + return errors.New("object references is empty") + } + var propSpec *types.PropertySpec var objectSet []types.ObjectSpec