mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-20 04:39:09 -07:00
Fixed crash on Windows when dragging and dropping a non gcode file into gcode viewer exe file
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user