mirror of https://github.com/KLayout/klayout.git
Bugfix: avoid a segfault in the property editor due to invalid array access (difficult to reproduce).
This commit is contained in:
parent
4631a806ef
commit
d31c9dbf6c
|
|
@ -379,7 +379,7 @@ PropertiesDialog::update_controls ()
|
|||
|
||||
mp_ui->apply_to_all_cbx->setChecked (m_object_indexes.size () > 1);
|
||||
|
||||
if (m_index < 0) {
|
||||
if (m_index < 0 || m_index >= int (mp_properties_pages.size ())) {
|
||||
|
||||
mp_stack->setCurrentWidget (mp_none);
|
||||
|
||||
|
|
@ -552,6 +552,10 @@ PropertiesDialog::apply ()
|
|||
{
|
||||
BEGIN_PROTECTED
|
||||
|
||||
if (m_index < 0 || m_index >= int (mp_properties_pages.size ())) {
|
||||
return;
|
||||
}
|
||||
|
||||
db::Transaction t (mp_manager, tl::to_string (QObject::tr ("Apply changes")), m_transaction_id);
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue