Skip to content

Commit

Permalink
Don't try to delete frames from empty images
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Feb 13, 2021
1 parent bf645f1 commit 705b0d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/messages/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ namespace detail {
// IMAGE2
Image::~Image()
{
if (this->empty_)
{
// No data in this image, don't bother trying to release it
// The reason we do this check is that we keep a few (or one) static empty image around that are deconstructed at the end of the programs lifecycle, and we want to prevent the isGuiThread call to be called after the QApplication has been exited
return;
}

// run destructor of Frames in gui thread
if (!isGuiThread())
{
Expand Down

0 comments on commit 705b0d5

Please sign in to comment.