From 1110067368b7f5e9bcd611cf04e4a0fac91c3d2c Mon Sep 17 00:00:00 2001 From: Jon Ashburn Date: Fri, 19 Feb 2016 15:22:10 -0700 Subject: loader: Fix standard_validation enumeration on instance chain Fixed regression and still handle no layers found case. --- loader/loader.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'loader/loader.c') diff --git a/loader/loader.c b/loader/loader.c index 789fe299..ccee9bd2 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -1783,11 +1783,10 @@ static void loader_add_layer_property_meta( bool found; struct loader_layer_list *layer_list; - if (0 == layer_count || - NULL == layer_instance_list || - NULL == layer_device_list || - (layer_count > layer_instance_list->count && - layer_count > layer_device_list->count)) + if (0 == layer_count || (!layer_instance_list && !layer_device_list)) + return; + if ((layer_instance_list && (layer_count > layer_instance_list->count)) && + (layer_device_list && (layer_count > layer_device_list->count))) return; for (j = 0; j < 2; j++) { @@ -1796,6 +1795,8 @@ static void loader_add_layer_property_meta( else layer_list = layer_device_list; found = true; + if (layer_list == NULL) + continue; for (i = 0; i < layer_count; i++) { if (loader_find_layer_name_list(layer_names[i], layer_list)) continue; -- cgit v1.2.3