// Destroy platform window if the viewport hasn't been submitted or if it is hosting a hidden window (the implicit Debug window will be registered its viewport then be disabled)
// New windows that appears directly in a new viewport won't always have a size on their frame
// New windows that appears directly in a new viewport won't always have a size on their frame
if(viewport->Size.x<=0||viewport->Size.y<=0)
if(viewport->Size.x<=0||viewport->Size.y<=0)
continue;
continue;
// Ignore viewport that are hosting a hidden window (also check the Active flag, as the implicit Debug window will be registering its viewport then immediately disabled)