From: Good Guy Date: Fri, 23 Nov 2018 19:45:50 +0000 (-0700) Subject: fix colorpicker segvs in sketcher/titler plugins X-Git-Tag: 2019-08~177 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=537b18f6fd34e3499123fb25287cd35b28efc491;p=goodguy%2Fcinelerra.git fix colorpicker segvs in sketcher/titler plugins --- diff --git a/cinelerra-5.1/plugins/sketcher/sketcherwindow.C b/cinelerra-5.1/plugins/sketcher/sketcherwindow.C index 08412fc8..33f5d575 100644 --- a/cinelerra-5.1/plugins/sketcher/sketcherwindow.C +++ b/cinelerra-5.1/plugins/sketcher/sketcherwindow.C @@ -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; diff --git a/cinelerra-5.1/plugins/sketcher/sketcherwindow.h b/cinelerra-5.1/plugins/sketcher/sketcherwindow.h index 55dc4f4e..71c8ac45 100644 --- a/cinelerra-5.1/plugins/sketcher/sketcherwindow.h +++ b/cinelerra-5.1/plugins/sketcher/sketcherwindow.h @@ -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); diff --git a/cinelerra-5.1/plugins/titler/titlerwindow.C b/cinelerra-5.1/plugins/titler/titlerwindow.C index c34e2903..9245368f 100644 --- a/cinelerra-5.1/plugins/titler/titlerwindow.C +++ b/cinelerra-5.1/plugins/titler/titlerwindow.C @@ -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