Fixes #3908, Large memory leak when switching folder in file browser
This commit is contained in:
@@ -56,20 +56,12 @@ void ThumbBrowserEntryBase::updateBackBuffer ()
|
||||
|
||||
Gtk::Widget* w = parent->getDrawingArea ();
|
||||
|
||||
Glib::RefPtr<Gdk::Window> win = w->get_window();
|
||||
|
||||
if (!win)
|
||||
// Nothing to draw on, so we return
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (backBuffer && (backBuffer->getWidth() != exp_width || backBuffer->getHeight() != exp_height )) {
|
||||
// deleting the existing BackBuffer
|
||||
backBuffer.reset();
|
||||
}
|
||||
if (!backBuffer) {
|
||||
backBuffer = Glib::RefPtr<BackBuffer> ( new BackBuffer (exp_width, exp_height, win) );
|
||||
backBuffer = Glib::RefPtr<BackBuffer> ( new BackBuffer (exp_width, exp_height, Cairo::FORMAT_RGB24) );
|
||||
}
|
||||
|
||||
// If thumbnail is hidden by a filter, drawing to it will crash
|
||||
|
Reference in New Issue
Block a user