Skip to content

Commit

Permalink
Fix possible crash on setting sector special
Browse files Browse the repository at this point in the history
Fixes #1512
Fixes #1513
  • Loading branch information
sirjuddington committed Jun 3, 2023
1 parent c7fa949 commit 5ee8dc0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/MapEditor/UI/Dialogs/SectorSpecialDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,22 @@ SectorSpecialPanel::SectorSpecialPanel(wxWindow* parent) : wxPanel(parent, -1)
wxSizerFlags(0).Expand().Border(wxLEFT | wxRIGHT | wxBOTTOM, ui::pad()));

// MBF21 Flags: Alternative Damage Mode | Kill Grounded Monsters
cb_alt_damage_ = new wxCheckBox(this, -1, "Alternate Damage Mode");
cb_kill_grounded_ = new wxCheckBox(this, -1, "Kill Grounded Monsters");
if (game::configuration().featureSupported(game::Feature::MBF21))
{
cb_alt_damage_ = new wxCheckBox(this, -1, "Alternate Damage Mode");
cb_kill_grounded_ = new wxCheckBox(this, -1, "Kill Grounded Monsters");
wxutil::layoutHorizontally(
framesizer,
{ cb_alt_damage_, cb_kill_grounded_ },
wxSizerFlags(0).Expand().Border(wxLEFT | wxRIGHT | wxBOTTOM, ui::pad()));

cb_alt_damage_->Bind(wxEVT_CHECKBOX, [&](wxCommandEvent&) { updateDamageDropdown(); });
}
else
{
cb_alt_damage_->Hide();
cb_kill_grounded_->Hide();
}

width = -1;
}
Expand Down

0 comments on commit 5ee8dc0

Please sign in to comment.