Skip to content

Commit

Permalink
Fix crash.
Browse files Browse the repository at this point in the history
Fix crash when click [Preferences]-[Behavior]-[Additional Buttons]-([Edit] or [Remove]) without selecting a button.
  • Loading branch information
hogehiga committed Apr 11, 2016
1 parent 72eaf61 commit cdf1d1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ void Prefs::on_edit_extra() {
etv->get_cursor(path, col);
if (!path.gobj())
return;
if (path.empty())
return;
Gtk::TreeIter iter = *etm->get_iter(path);
std::vector<ButtonInfo>::iterator i = (*iter)[ecs.i];
SelectButton sb(*i, true, true);
Expand All @@ -448,6 +450,8 @@ void Prefs::on_remove_extra() {
etv->get_cursor(path, col);
if (!path.gobj())
return;
if (path.empty())
return;
Gtk::TreeIter iter = *etm->get_iter(path);
Atomic a;
std::vector<ButtonInfo>::iterator i = (*iter)[ecs.i];
Expand Down

0 comments on commit cdf1d1a

Please sign in to comment.