fix colorpicker segvs in sketcher/titler plugins
authorGood Guy <[email protected]>
Fri, 23 Nov 2018 19:45:50 +0000 (12:45 -0700)
committerGood Guy <[email protected]>
Fri, 23 Nov 2018 19:45:50 +0000 (12:45 -0700)
cinelerra-5.1/plugins/sketcher/sketcherwindow.C
cinelerra-5.1/plugins/sketcher/sketcherwindow.h
cinelerra-5.1/plugins/titler/titlerwindow.C

index 08412fc8d1211929e6e6d834b5cfd432640a38a2..33f5d57575c33b0566213167ef334cc45895275a 100644 (file)
@@ -575,6 +575,11 @@ void SketcherWindow::create_objects()
        show_window(1);
 }
 
+void SketcherWindow::done_event(int result)
+{
+       delete color_picker;  color_picker = 0;
+}
+
 void SketcherWindow::send_configure_change()
 {
        pending_config = 0;
index 55dc4f4ef38169a5ee689a7daf31597c3f891511..71c8ac45018b8f1dbf50e9d1ec3d98aefa0cb6ec 100644 (file)
@@ -389,6 +389,7 @@ public:
        ~SketcherWindow();
 
        void create_objects();
+       void done_event(int result);
        void update_gui();
        void start_color_thread(SketcherCurveColor *curve_color);
        int grab_event(XEvent *event);
index c34e29038840f23773e554c3456c43d3279e64e7..9245368f9bce421f77406ccdd8ec06c0353b32c6 100644 (file)
@@ -77,6 +77,7 @@ TitleWindow::TitleWindow(TitleMain *client)
        drag = 0;
        cur_popup = 0;
        fonts_popup = 0;
+       png_popup = 0;
 
        color_x = color_y = 0;
        outline_color_x = outline_color_y = 0;
@@ -92,6 +93,7 @@ TitleWindow::TitleWindow(TitleMain *client)
        encoding = 0;
        color_button = 0;
        color_thread = 0;
+       color_popup = 0;
        outline_color_button = 0;
        outline_color_thread = 0;
        motion_title = 0;
@@ -121,14 +123,17 @@ TitleWindow::TitleWindow(TitleMain *client)
 void TitleWindow::done_event(int result)
 {
        drag->drag_deactivate();
-       color_thread->close_window();
-       outline_color_thread->close_window();
-       color_popup->close_window();
-       png_popup->close_window();
+       delete color_thread;    color_thread = 0;
+       delete outline_color_thread;  outline_color_thread = 0;
+       delete color_popup;     color_popup = 0;
+       delete png_popup;       png_popup = 0;
+
 }
 
 TitleWindow::~TitleWindow()
 {
+       delete color_thread;
+       delete outline_color_thread;
        delete color_popup;
        delete png_popup;
        for( int i=0; i<fonts.size(); ++i )