mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Fixed crash on Windows when dragging and dropping a non gcode file into gcode viewer exe file
This commit is contained in:
parent
8d59abfdf8
commit
4222d80afe
2 changed files with 4 additions and 2 deletions
|
@ -156,7 +156,7 @@ int CLI::run(int argc, char **argv)
|
|||
#if ENABLE_GCODE_VIEWER
|
||||
for (const std::string& file : m_input_files) {
|
||||
std::string ext = boost::filesystem::path(file).extension().string();
|
||||
if (boost::filesystem::path(file).extension().string() == ".gcode") {
|
||||
if (ext == ".gcode" || ext == ".g") {
|
||||
if (boost::filesystem::exists(file)) {
|
||||
start_as_gcodeviewer = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue