mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57: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
|
@ -4702,7 +4702,9 @@ void Plater::load_gcode()
|
|||
|
||||
void Plater::load_gcode(const wxString& filename)
|
||||
{
|
||||
if (filename.empty() || m_last_loaded_gcode == filename)
|
||||
if (filename.empty() ||
|
||||
(!filename.Lower().EndsWith(".gcode") && !filename.Lower().EndsWith(".g")) ||
|
||||
m_last_loaded_gcode == filename)
|
||||
return;
|
||||
|
||||
m_last_loaded_gcode = filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue