From b386f52accc85907c9c69a35e7948382f674333c Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 21 Jun 2018 09:54:43 +0200 Subject: Removed error dialog when texture file does not exist --- xs/src/slic3r/GUI/GLTexture.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xs') diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 593362e54..924920bd8 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -4,6 +4,8 @@ #include +#include + #include #include @@ -27,6 +29,9 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap { reset(); + if (!boost::filesystem::exists(filename)) + return false; + // Load a PNG with an alpha channel. wxImage image; if (!image.LoadFile(filename, wxBITMAP_TYPE_PNG)) -- cgit v1.2.3