diff options
| author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-06 22:28:18 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-07 17:57:49 -0600 |
| commit | 55e1704e4eba84265f3c1b2b8e46b1d3bd7f3001 (patch) | |
| tree | 964f3d6344b97cefb56c1425059fecf02628f351 | |
| parent | 8d91c65c214c98a4bb7aa32284049b20dae94a5e (diff) | |
| download | usermoji-55e1704e4eba84265f3c1b2b8e46b1d3bd7f3001.tar.xz | |
loader: early exit if nothing to do.
| -rw-r--r-- | loader/loader.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/loader/loader.c b/loader/loader.c index 4d88543d..f6997e2b 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -393,12 +393,22 @@ static void loader_add_global_extensions( VkExtensionProperties *extension_properties; VkResult res; + if (!fp_get_props) { + /* No GetGlobalExtensionProperties defined */ + return; + } + res = fp_get_props(NULL, &count, NULL); if (res != VK_SUCCESS) { loader_log(VK_DBG_REPORT_WARN_BIT, 0, "Error getting global extension count from %s", lib_name); return; } + if (count == 0) { + /* No ExtensionProperties to report */ + return; + } + extension_properties = loader_stack_alloc(count * sizeof(VkExtensionProperties)); res = fp_get_props(NULL, &count, extension_properties); |
