mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 15:24:34 +00:00
Fixed lack of nullptr check for app and engine name in InstanceBuilder
This commit is contained in:
parent
14541f447c
commit
4a4078d276
@ -172,9 +172,9 @@ detail::Expected<Instance, detail::Error<InstanceError>> InstanceBuilder::build
|
|||||||
VkApplicationInfo app_info = {};
|
VkApplicationInfo app_info = {};
|
||||||
app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
app_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
||||||
app_info.pNext = nullptr;
|
app_info.pNext = nullptr;
|
||||||
app_info.pApplicationName = info.app_name;
|
app_info.pApplicationName = info.app_name != nullptr ? info.app_name : "";
|
||||||
app_info.applicationVersion = info.application_version;
|
app_info.applicationVersion = info.application_version;
|
||||||
app_info.pEngineName = info.engine_name;
|
app_info.pEngineName = info.engine_name != nullptr ? info.engine_name : "";
|
||||||
app_info.engineVersion = info.engine_version;
|
app_info.engineVersion = info.engine_version;
|
||||||
app_info.apiVersion = info.api_version;
|
app_info.apiVersion = info.api_version;
|
||||||
|
|
||||||
|
@ -158,8 +158,8 @@ class InstanceBuilder {
|
|||||||
private:
|
private:
|
||||||
struct InstanceInfo {
|
struct InstanceInfo {
|
||||||
// VkApplicationInfo
|
// VkApplicationInfo
|
||||||
const char* app_name;
|
const char* app_name = nullptr;
|
||||||
const char* engine_name;
|
const char* engine_name = nullptr;
|
||||||
uint32_t application_version = 0;
|
uint32_t application_version = 0;
|
||||||
uint32_t engine_version = 0;
|
uint32_t engine_version = 0;
|
||||||
uint32_t api_version = VK_MAKE_VERSION (1, 0, 0);
|
uint32_t api_version = VK_MAKE_VERSION (1, 0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user