Don't crash when there are zero displays

Resizing a vector to zero size and then attempting to dereference
the first element cause STL to throw an exceptoin or other
undesirable behavior.

Instead just throw NotSupportedError when there are zero displays.

Affects:

dEQP-VK.wsi.display.*

Components: Vulkan

VK-GL-CTS issue: 2534

Change-Id: Ifd097d8043e8bcb9c20809873d146a7fa4263b4a
diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTests.cpp
index e59bef6..33b4f7f 100644
--- a/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTests.cpp
+++ b/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTests.cpp
@@ -333,6 +333,9 @@
 		return false;
 	}
 
+	if (!countReported)
+		TCU_THROW(NotSupportedError, "No displays reported");
+
 	displaysProps.resize(countReported);
 
 	countRetrieved = countReported;
@@ -544,6 +547,9 @@
 		return false;
 	}
 
+	if (!countReported)
+		TCU_THROW(NotSupportedError, "No displays reported");
+
 	displaysProps.resize(countReported, displayProperties2);
 
 	countRetrieved = countReported;