mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
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:
parent
cb54d8ae6d
commit
67e266338e
|
@ -40,6 +40,8 @@ void ImageComponent::resize()
|
||||||
SVGResource* svg = dynamic_cast<SVGResource*>(mTexture.get());
|
SVGResource* svg = dynamic_cast<SVGResource*>(mTexture.get());
|
||||||
|
|
||||||
const Eigen::Vector2f textureSize = svg ? svg->getSourceImageSize() : Eigen::Vector2f((float)mTexture->getSize().x(), (float)mTexture->getSize().y());
|
const Eigen::Vector2f textureSize = svg ? svg->getSourceImageSize() : Eigen::Vector2f((float)mTexture->getSize().x(), (float)mTexture->getSize().y());
|
||||||
|
if(textureSize.isZero())
|
||||||
|
return;
|
||||||
|
|
||||||
if(mTexture->isTiled())
|
if(mTexture->isTiled())
|
||||||
{
|
{
|
||||||
|
|
|
@ -272,9 +272,9 @@ int main(int argc, char* argv[])
|
||||||
Log::flush();
|
Log::flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.deinit();
|
|
||||||
while(window.peekGui() != window.getViewController())
|
while(window.peekGui() != window.getViewController())
|
||||||
delete window.peekGui();
|
delete window.peekGui();
|
||||||
|
window.deinit();
|
||||||
|
|
||||||
SystemData::deleteSystems();
|
SystemData::deleteSystems();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue