From 51bb8ed5ce20069972b3266a668eefbd94df20a6 Mon Sep 17 00:00:00 2001
From: James Turner <zakalawe@mac.com>
Date: Wed, 12 Aug 2020 16:36:22 +0100
Subject: [PATCH] GUI: clean PUI junk on GUI shutdown

---
 src/GUI/new_gui.cxx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx
index 04b0d4473..3ff7a7bc3 100644
--- a/src/GUI/new_gui.cxx
+++ b/src/GUI/new_gui.cxx
@@ -45,6 +45,8 @@
 using std::map;
 using std::string;
 
+extern void puCleanUpJunk(void);
+
 ////////////////////////////////////////////////////////////////////////
 // Implementation of NewGUI.
 ////////////////////////////////////////////////////////////////////////
@@ -108,6 +110,8 @@ NewGUI::shutdown()
     fgUntie("/sim/menubar/visibility");
     _menubar.reset();
     _dialog_props.clear();
+
+    puCleanUpJunk();
 }
 
 void