Fix potential NULL dereference if no draw is found rendering overlay

This commit is contained in:
baldurk
2018-01-02 16:30:27 +00:00
parent dec06a19fb
commit 3c4d9147fb
+5 -1
View File
@@ -5430,7 +5430,11 @@ ResourceId VulkanDebugManager::RenderOverlay(ResourceId texid, DebugOverlay over
{
rs->lineWidth = 1.0f;
if(m_pDriver->GetDeviceFeatures().fillModeNonSolid)
if(mainDraw == NULL)
{
// do nothing
}
else if(m_pDriver->GetDeviceFeatures().fillModeNonSolid)
{
rs->polygonMode = VK_POLYGON_MODE_LINE;
}