Fixed #897 (crash in fill tool)

This commit is contained in:
Matthias Koefferlein 2021-08-29 21:33:54 +02:00
parent 93e789a861
commit 45850cec70
1 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ FillDialog::get_fill_parameters ()
// visible layers
for (lay::LayerPropertiesConstIterator l = mp_view->begin_layers (); ! l.at_end (); ++l) {
if (! l->has_children () && l->visible (true)) {
if (! l->has_children () && l->visible (true) && cv->layout ().is_valid_layer (l->layer_index ())) {
fp.exclude_layers.push_back (cv->layout ().get_properties (l->layer_index ()));
}
}
@ -320,7 +320,7 @@ FillDialog::get_fill_parameters ()
// selected layers
std::vector<lay::LayerPropertiesConstIterator> s = mp_view->selected_layers ();
for (std::vector<lay::LayerPropertiesConstIterator>::const_iterator l = s.begin (); l != s.end (); ++l) {
if (! (*l)->has_children ()) {
if (! (*l)->has_children () && cv->layout ().is_valid_layer ((*l)->layer_index ())) {
fp.exclude_layers.push_back (cv->layout ().get_properties ((*l)->layer_index ()));
}
}