Check debug message callback against VK_NULL_HANDLE (fixes defunct android build)

This commit is contained in:
saschawillems 2016-04-15 20:57:34 +02:00
parent 343a25cbed
commit def86e02f0

View file

@ -48,7 +48,7 @@ namespace vkDebug
if (flags & VK_DEBUG_REPORT_WARNING_BIT_EXT) if (flags & VK_DEBUG_REPORT_WARNING_BIT_EXT)
{ {
// Uncomment to see warnings // Uncomment to see warnings
//std::cout << "WARNING: " << "[" << pLayerPrefix << "] Code " << msgCode << " : " << pMsg << "\n"; std::cout << "WARNING: " << "[" << pLayerPrefix << "] Code " << msgCode << " : " << pMsg << "\n";
} }
else else
{ {
@ -82,7 +82,7 @@ namespace vkDebug
void freeDebugCallback(VkInstance instance) void freeDebugCallback(VkInstance instance)
{ {
if (msgCallback != nullptr) if (msgCallback != VK_NULL_HANDLE)
{ {
// Commented out as this crashes on some implementations for some reason (at least in VS2015) // Commented out as this crashes on some implementations for some reason (at least in VS2015)
// DestroyDebugReportCallback(instance, msgCallback, nullptr); // DestroyDebugReportCallback(instance, msgCallback, nullptr);