From 74c16f5c8188622cb1e8033386bde1521bbfe98f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 25 Oct 2023 20:56:44 +0200 Subject: [PATCH] Add a safety check before accessing lists in the comic flow --- CHANGELOG.md | 6 +++++- common/gl/yacreader_flow_gl.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d458efc5..4a068e34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,14 @@ Version counting is based on semantic versioning (Major.Feature.Patch) * Add menu to choose what columns are displayed in the table comics view (do a right click on the header to show it). The view has new 3 new headers to choose from (Series, Volume and Story arc). * Migrate `number` and `arcNumber` data types to `TEXT`. This only affects databases created before 9.13 and fixes problems with some formats of numbers (e.g. 1.10). * Propage update date to all the parent folders. +* Fix crash when resorting comics in reading lists in table view view and the comic flow is hidden. -### YACReaderLibrary +### YACReaderLibraryServer * Add `rescan-xml-info` command. +## All Apps +* New universal builds for macos. + ## 9.13.1 ### YACReaderLibrary diff --git a/common/gl/yacreader_flow_gl.cpp b/common/gl/yacreader_flow_gl.cpp index b2394f39..93b8e7cd 100644 --- a/common/gl/yacreader_flow_gl.cpp +++ b/common/gl/yacreader_flow_gl.cpp @@ -1267,6 +1267,10 @@ void YACReaderComicFlowGL::resortCovers(QList newOrder) int index = 0; foreach (int i, newOrder) { + if (i < 0 || i >= images.size()) { + continue; + } + pathsNew << paths.at(i); loadedNew << loaded.at(i); marksNew << marks.at(i);