mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-17 03:35:57 +08:00
Check the return value of get_field() before use
Other calls to toggle() check if the field exists first, this one should too. Fixes #2126 Signed-off-by: Stephen Hurd <shurd@sasktel.net>
This commit is contained in:
parent
c148bbc1bf
commit
0d5add8413
@ -3032,8 +3032,11 @@ void TabPrinter::toggle_options()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// wipe_only_crossing can only work if avoid_crossing_perimeters
|
// wipe_only_crossing can only work if avoid_crossing_perimeters
|
||||||
if (!full_print_config.opt_bool("avoid_crossing_perimeters"))
|
if (!full_print_config.opt_bool("avoid_crossing_perimeters")) {
|
||||||
get_field("wipe_only_crossing", i)->toggle(false);
|
field = get_field("wipe_only_crossing", i);
|
||||||
|
if (field)
|
||||||
|
field->toggle(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (use_firmware_retraction && wipe) {
|
if (use_firmware_retraction && wipe) {
|
||||||
wxMessageDialog dialog(parent(),
|
wxMessageDialog dialog(parent(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user