diff --git a/src/components/ImageComponent.cpp b/src/components/ImageComponent.cpp index c8b228e1a..8420d2dc4 100644 --- a/src/components/ImageComponent.cpp +++ b/src/components/ImageComponent.cpp @@ -40,6 +40,8 @@ void ImageComponent::resize() SVGResource* svg = dynamic_cast(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()) { diff --git a/src/main.cpp b/src/main.cpp index 06dc8a229..ccd4bfc8f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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();