diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-06-21 10:54:43 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-06-21 10:54:43 +0300 |
commit | b386f52accc85907c9c69a35e7948382f674333c (patch) | |
tree | d736ecfa92e2087d3b2ae58c3dfde70e152fc793 /xs | |
parent | f8bbfad1523e2630a7f34de969c02f45c0bd5e06 (diff) |
Removed error dialog when texture file does not exist
Diffstat (limited to 'xs')
-rw-r--r-- | xs/src/slic3r/GUI/GLTexture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <wx/image.h> +#include <boost/filesystem.hpp> + #include <vector> #include <algorithm> @@ -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)) |