Skip to content

Commit

Permalink
Fix ~SortedImageModel never being called
Browse files Browse the repository at this point in the history
Addresses #35
  • Loading branch information
derselbst committed May 20, 2023
1 parent 3031aca commit a842b7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/decoders/SmartImageDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void SmartImageDecoder::run()
std::lock_guard g(d->asyncApiMtx);
d->promise->start();

// reference the currently decoded image to prevent it from being deleted while decoding is still ongoing
// reference the currently decoded image to prevent it from being deleted while decoding is still ongoing (#43)
auto refImg = d->imageUnsafe();
if (!refImg.isNull())
{
Expand Down
2 changes: 1 addition & 1 deletion src/logic/ANPV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ struct ANPV::Impl
this->dirModel->setRootPath("");
this->dirModel->setFilter(QDir::Dirs | QDir::NoDotAndDotDot);

this->fileModel = new SortedImageModel(nullptr);
this->fileModel = new SortedImageModel(q);
connect(qGuiApp, &QGuiApplication::lastWindowClosed, q,
[&]()
{
Expand Down

0 comments on commit a842b7c

Please sign in to comment.