Skip to content

Commit b1e49f6

Browse files
Merge pull request #2283 from abdelq/crash-on-reload
Avoid crashing when clicking reload
2 parents 415650b + ec4485a commit b1e49f6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/lay/lay/layMacroEditorPage.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,14 @@ MacroEditorNotificationWidget::MacroEditorNotificationWidget (MacroEditorPage *p
124124
void
125125
MacroEditorNotificationWidget::action_triggered ()
126126
{
127+
BEGIN_PROTECTED
128+
127129
auto a = m_action_buttons.find (sender ());
128130
if (a != m_action_buttons.end ()) {
129131
mp_parent->notification_action (*mp_notification, a->second);
130132
}
133+
134+
END_PROTECTED_W (this)
131135
}
132136

133137
void

src/layview/layview/layLayoutView_qt.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,14 @@ LayoutViewNotificationWidget::LayoutViewNotificationWidget (LayoutViewWidget *pa
139139
void
140140
LayoutViewNotificationWidget::action_triggered ()
141141
{
142+
BEGIN_PROTECTED
143+
142144
auto a = m_action_buttons.find (sender ());
143145
if (a != m_action_buttons.end ()) {
144146
mp_parent->notification_action (*mp_notification, a->second);
145147
}
148+
149+
END_PROTECTED_W (this)
146150
}
147151

148152
void

0 commit comments

Comments
 (0)