GUI: jobs: avoid nullptr dereferencing while dragging/dropping items

Introduced by #3720. Fixes #3729.
This commit is contained in:
Moritz Bunkus 2024-08-04 13:46:38 +02:00
parent b7d2f71a43
commit 853b19b040
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,9 @@
element is not found within the first LOAS/LATM frame, `mkvmerge` will no
longer discard the frames before it but defer parsing them until after it
has found the `AudioSpecificConfig` element. Fixes #3727.
* MKVToolNix GUI: job queue: fixed the GUI crashing when re-ordering the jobs
in the job queue. This regression was introduced while fixing #3720. Fixes
#3729.
## Build system changes

View File

@ -145,7 +145,8 @@ Model::selectedJobs(QAbstractItemView *view) {
uint64_t
Model::idFromRow(int row)
const {
return item(row)->data(Util::JobIdRole).value<uint64_t>();
auto itm = item(row);
return itm ? itm->data(Util::JobIdRole).value<uint64_t>() : 0;
}
int