I've attached a patch which I believe fixes this issue.
When a GmatMdiChildFrame is closed (specifically, deleted), it tries to use UpdateGuiItem to alter some widgets in its parent. If the parent is in the process of being destroyed - as when closing the whole program - then this fails. I checked out the wxWidgets references and I believe the cleanup is generally happening correctly; the parent MDI frame (in this case, the MainFrame) is cleaning up its children as part of its own cleanup. At the time the MdiChildFrame's destructor is called, though, trying to alter the toolbar (for example) in the main frame causes a crash on some platforms.
My patch checks the MainFrame pointer in the GmatAppData - which is zeroed in the destructor of GmatMainFrame - to determine if the main frame is being destroyed and, if so, does not call UpdateGuiItem.