Issue 2990: Fix possible memory leak ; at least, let the Windows version
w/ Gtk3.18 start w/o crashing
This commit is contained in:
@@ -64,7 +64,13 @@ void ThumbBrowserEntryBase::updateBackBuffer ()
|
||||
return;
|
||||
}
|
||||
|
||||
backBuffer = Glib::RefPtr<BackBuffer> ( new BackBuffer (exp_width, exp_height, win) );
|
||||
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) );
|
||||
}
|
||||
|
||||
// If thumbnail is hidden by a filter, drawing to it will crash
|
||||
// if either with or height is zero then return early
|
||||
|
Reference in New Issue
Block a user