mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 05:40:39 +08:00
SPE-2656: Fix of failed Load file in ScalableBitmap constructor.
This commit is contained in:
parent
8c4183185b
commit
e6925fd86b
@ -487,7 +487,10 @@ ScalableBitmap::ScalableBitmap(wxWindow* parent, boost::filesystem::path& icon_p
|
||||
const std::string ext = icon_path.extension().string();
|
||||
|
||||
if (ext == ".png" || ext == ".jpg") {
|
||||
bitmap.LoadFile(path, ext == ".png" ? wxBITMAP_TYPE_PNG : wxBITMAP_TYPE_JPEG);
|
||||
if (!bitmap.LoadFile(path, ext == ".png" ? wxBITMAP_TYPE_PNG : wxBITMAP_TYPE_JPEG)) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to load bitmap " << path;
|
||||
return;
|
||||
}
|
||||
|
||||
// check if the bitmap has a square shape
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user