mb_tail_dda: some code forgot to check for null
This commit is contained in:
parent
4573a8fbbb
commit
80136a51d8
|
|
@ -67,7 +67,7 @@ void queue_step() {
|
||||||
|
|
||||||
This needs no atomic protection, because we're in an interrupt already.
|
This needs no atomic protection, because we're in an interrupt already.
|
||||||
*/
|
*/
|
||||||
if ( ! mb_tail_dda->live) {
|
if (mb_tail_dda == NULL || ! mb_tail_dda->live) {
|
||||||
if (mb_tail != mb_head) {
|
if (mb_tail != mb_head) {
|
||||||
mb_tail = MB_NEXT(mb_tail);
|
mb_tail = MB_NEXT(mb_tail);
|
||||||
mb_tail_dda = &(movebuffer[mb_tail]);
|
mb_tail_dda = &(movebuffer[mb_tail]);
|
||||||
|
|
|
||||||
|
|
@ -609,19 +609,21 @@ void process_gcode_command() {
|
||||||
current_position.axis[Z], current_position.axis[E],
|
current_position.axis[Z], current_position.axis[E],
|
||||||
current_position.F);
|
current_position.F);
|
||||||
|
|
||||||
if (DEBUG_POSITION && (debug_flags & DEBUG_POSITION)) {
|
if (mb_tail_dda != NULL) {
|
||||||
sersendf_P(PSTR("Endpoint: X:%ld,Y:%ld,Z:%ld,E:%ld,F:%lu,c:%lu}\n"),
|
if (DEBUG_POSITION && (debug_flags & DEBUG_POSITION)) {
|
||||||
mb_tail_dda->endpoint.axis[X],
|
sersendf_P(PSTR("Endpoint: X:%ld,Y:%ld,Z:%ld,E:%ld,F:%lu,c:%lu}\n"),
|
||||||
mb_tail_dda->endpoint.axis[Y],
|
mb_tail_dda->endpoint.axis[X],
|
||||||
mb_tail_dda->endpoint.axis[Z],
|
mb_tail_dda->endpoint.axis[Y],
|
||||||
mb_tail_dda->endpoint.axis[E],
|
mb_tail_dda->endpoint.axis[Z],
|
||||||
mb_tail_dda->endpoint.F,
|
mb_tail_dda->endpoint.axis[E],
|
||||||
#ifdef ACCELERATION_REPRAP
|
mb_tail_dda->endpoint.F,
|
||||||
mb_tail_dda->end_c
|
#ifdef ACCELERATION_REPRAP
|
||||||
#else
|
mb_tail_dda->end_c
|
||||||
mb_tail_dda->c
|
#else
|
||||||
#endif
|
mb_tail_dda->c
|
||||||
);
|
#endif
|
||||||
|
);
|
||||||
|
}
|
||||||
print_queue();
|
print_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue