Do not access the first list's element if the list possibly
might be empty.
Details
Details
- Reviewers
dhaumann - Commits
- R304:c4275aaf79fc: Handle empty preview lists
Diff Detail
Diff Detail
- Repository
- R304 KNewStuff
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
I had a crash at the respective locations while porting Artikulate to the QtQuick based API, since those KNS resource files do not provide previews.
However, IMO this patch fixes an unsafe access to a list element without checking that it exists.