Fixed assert being triggered due to divide by zero in HelpComponent::updateGrid due to SVG textures being deinitialized when closing ES with a menu open.

This commit is contained in:
Aloshi 2014-05-26 17:52:55 -05:00
parent cb54d8ae6d
commit 67e266338e
2 changed files with 3 additions and 1 deletions

View file

@ -40,6 +40,8 @@ void ImageComponent::resize()
SVGResource* svg = dynamic_cast<SVGResource*>(mTexture.get());
const Eigen::Vector2f textureSize = svg ? svg->getSourceImageSize() : Eigen::Vector2f((float)mTexture->getSize().x(), (float)mTexture->getSize().y());
if(textureSize.isZero())
return;
if(mTexture->isTiled())
{

View file

@ -272,9 +272,9 @@ int main(int argc, char* argv[])
Log::flush();
}
window.deinit();
while(window.peekGui() != window.getViewController())
delete window.peekGui();
window.deinit();
SystemData::deleteSystems();