Skip to content

Commit

Permalink
practices: Avoid null pApplicationInfo deref
Browse files Browse the repository at this point in the history
Change-Id: Ia535aea6177ebdb01bf1f14b423522178a6c980f
  • Loading branch information
mark-lunarg committed Jun 3, 2020
1 parent ae9f00a commit df79eff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layers/best_practices_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ bool BestPractices::PreCallValidateCreateInstance(const VkInstanceCreateInfo* pC
"vkCreateInstance(): Attempting to enable Device Extension %s at CreateInstance time.",
pCreateInfo->ppEnabledExtensionNames[i]);
}
skip |= ValidateDeprecatedExtensions("CreateInstance", pCreateInfo->ppEnabledExtensionNames[i],
pCreateInfo->pApplicationInfo->apiVersion,
uint32_t specified_version =
(pCreateInfo->pApplicationInfo ? pCreateInfo->pApplicationInfo->apiVersion : VK_API_VERSION_1_0);
skip |= ValidateDeprecatedExtensions("CreateInstance", pCreateInfo->ppEnabledExtensionNames[i], specified_version,
kVUID_BestPractices_CreateInstance_DeprecatedExtension);
}

Expand Down

0 comments on commit df79eff

Please sign in to comment.