mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix crash when the comics view content is empty after an update
This commit is contained in:
parent
4fbaa881df
commit
f4ec6c8927
@ -18,6 +18,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch)
|
|||||||
* New setting to open comics in third party reader apps, it works by entering a command that will launch the app, e.g. "/path/to/the/app {comic_file_path}". You can use `{comic_file_path}` as a placeholder where `YACReaderLibrary` will place thet path to the comic file.
|
* New setting to open comics in third party reader apps, it works by entering a command that will launch the app, e.g. "/path/to/the/app {comic_file_path}". You can use `{comic_file_path}` as a placeholder where `YACReaderLibrary` will place thet path to the comic file.
|
||||||
* Purge covers and metadata not being used after a full library update.
|
* Purge covers and metadata not being used after a full library update.
|
||||||
* Fix crash when updating the current folder content after a library update.
|
* Fix crash when updating the current folder content after a library update.
|
||||||
|
* Fix crash when current folders is empty after an update.
|
||||||
|
|
||||||
### YACReaderLibraryServer
|
### YACReaderLibraryServer
|
||||||
* New command --system-info to print information about the execution environment and available resources (including what image formats are supported and what libraries are used by the app).
|
* New command --system-info to print information about the execution environment and available resources (including what image formats are supported and what libraries are used by the app).
|
||||||
|
@ -63,6 +63,13 @@ void ComicsView::updateInfoForIndex(int index)
|
|||||||
if (comicDB != nullptr)
|
if (comicDB != nullptr)
|
||||||
delete comicDB;
|
delete comicDB;
|
||||||
|
|
||||||
|
if ((index < 0) || (index >= model->rowCount())) {
|
||||||
|
ctxt->setContextProperty("comic", nullptr);
|
||||||
|
ctxt->setContextProperty("comicInfo", nullptr);
|
||||||
|
ctxt->setContextProperty("comic_info_index", -1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
comicDB = new ComicDB(model->getComic(this->model->index(index, 0)));
|
comicDB = new ComicDB(model->getComic(this->model->index(index, 0)));
|
||||||
ComicInfo *comicInfo = &(comicDB->info);
|
ComicInfo *comicInfo = &(comicDB->info);
|
||||||
comicInfo->isFavorite = model->isFavorite(model->index(index, 0));
|
comicInfo->isFavorite = model->isFavorite(model->index(index, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user