Skip to content

Commit

Permalink
Merge pull request scp-fs2open#5871 from Goober5000/juggling_fix
Browse files Browse the repository at this point in the history
juggling fix
  • Loading branch information
JohnAFernandez authored Dec 9, 2023
2 parents fbb3a8f + fd6ca9d commit c37e1b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fred2/briefingeditordlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ void briefing_editor_dlg::OnCancel()
void briefing_editor_dlg::OnClose()
{
int bs, i, j, s, t, dup = 0;
briefing_editor_dlg *ptr;
brief_stage *sp;

m_cur_stage = -1;
Expand All @@ -305,8 +306,9 @@ void briefing_editor_dlg::OnClose()
MessageBox("You have duplicate icon names. You should resolve these.", "Warning");

theApp.record_window_data(&Briefing_wnd_data, this);
delete Briefing_dialog;
ptr = Briefing_dialog; // this juggling prevents a crash in certain situations
Briefing_dialog = NULL;
delete ptr;

FREDDoc_ptr->autosave("briefing editor");
}
Expand Down

0 comments on commit c37e1b1

Please sign in to comment.