Skip to content

Commit 5a45585

Browse files
committed
this fixes an error with buffer overflow when a user clicks very fast in the preview while a program is running. Fixes #2631
1 parent 7d4f3a3 commit 5a45585

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/emc/usr_intf/gremlin/gremlin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,13 @@ def select_prime(self, x, y):
490490

491491
@rs274.glcanon.with_context
492492
def select_fire(self, widget, event):
493+
# if program is running, do not update the line:
494+
# if the user clicks in the preview,
495+
# Highlighting the line can cause an error with buffer OverflowError
496+
#print("DEBUG NORBERT",self.stat.state, linuxcnc.RCS_EXEC)
497+
if self.stat.state == linuxcnc.RCS_EXEC:
498+
return
499+
493500
if not self.select_primed: return
494501
x, y = self.select_primed
495502
self.select_primed = None

0 commit comments

Comments
 (0)