1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-16 08:54:26 +00:00

Fixed crash on Windows when dragging and dropping a non gcode file into gcode viewer exe file

This commit is contained in:
enricoturri1966
2020-10-22 13:54:31 +02:00
parent 8d59abfdf8
commit 4222d80afe
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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;