change thread join strategy, fix a few leaks, fix a few bugs
[goodguy/history.git] / cinelerra-5.1 / guicast / bcdragwindow.C
index 16a38c4f0014441289155bfccb7566b0daa981e4..b7ec98e23265428484b901100e91d52d3e4c3d36 100644 (file)
@@ -46,6 +46,7 @@ BC_DragWindow::BC_DragWindow(BC_WindowBase *parent_window,
        pixmap)
 {
        temp_frame = 0;
+       drag_pixmap = 0;
 //     init_x = icon_x;
 //     init_y = icon_y;
        init_x = parent_window->get_abs_cursor_x(0) + DRAG_OFFSET_X;
@@ -90,6 +91,7 @@ BC_DragWindow::BC_DragWindow(BC_WindowBase *parent_window,
 
 BC_DragWindow::~BC_DragWindow()
 {
+       delete drag_pixmap;
 }
 
 int BC_DragWindow::get_init_x(BC_WindowBase *parent_window, int icon_x)
@@ -202,11 +204,11 @@ BC_Pixmap *BC_DragWindow::prepare_frame(VFrame *frame, BC_WindowBase *parent_win
                        0, frame->get_w(), temp_frame->get_w());
        }
        temp_frame->get_rows()[(temp_frame->get_h() / 2)][(temp_frame->get_w() / 2) * 4 + 3] = 0;
-       my_pixmap = new BC_Pixmap(parent_window,
+       drag_pixmap = new BC_Pixmap(parent_window,
                        temp_frame,
                        PIXMAP_ALPHA);
 
-       return (my_pixmap);
+       return drag_pixmap;
 }