Skip to content

Commit 7218711

Browse files
authored
Merge pull request #3465 from fghnntp/fix-bug-rs274-collapse
fix: rs274 nullptr will collapse the milltask when hal para is wrong
2 parents d6520ef + 8af4885 commit 7218711

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/emc/rs274ngc/gcodemodule.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ static InterpBase *pinterp;
193193

194194
#define callmethod(o, m, f, ...) PyObject_CallMethod((o), (char*)(m), (char*)(f), ## __VA_ARGS__)
195195

196-
static void maybe_new_line(int sequence_number=pinterp->sequence_number());
196+
static void maybe_new_line(int sequence_number);
197+
static void maybe_new_line();
198+
197199
static void maybe_new_line(int sequence_number) {
198200
if(!pinterp) return;
199201
if(interp_error) return;
@@ -213,6 +215,11 @@ static void maybe_new_line(int sequence_number) {
213215
Py_XDECREF(result);
214216
}
215217

218+
static void maybe_new_line() {
219+
if(!pinterp) return;
220+
maybe_new_line(pinterp->sequence_number());
221+
}
222+
216223
//das ist für die Vorschau
217224
/* G_5_2/G_5_3*/
218225
void NURBS_G5_FEED(int line_number, const std::vector<NURBS_CONTROL_POINT>& nurbs_control_points, unsigned int nurbs_order, CANON_PLANE plane)

0 commit comments

Comments
 (0)