Fixing crash when opening .bib file
authorThomas Fischer <fischer@unix-ag.uni-kl.de>
Fri, 30 Dec 2022 23:00:04 +0000 (00:00 +0100)
committerAdrian Bunk <bunk@debian.org>
Tue, 7 Feb 2023 16:22:51 +0000 (16:22 +0000)
commit9ecd529d05685b9fa4d5adc40bc1d0168aed8966
tree6a96dc22f2862a956d39e0b9415afaf907a3a1d5
parent5fd7175c3fe865cbc1973e32c18b5d0840d58afc
Fixing crash when opening .bib file

In certain situations, also depending on Linux distributions (varying Qt
and KDE Frameworks versions), opening a bibliography file can cause
crashes (segmentation faults) due to an invalid model or its underlying
data.

This commit changes the order of two instructions. Now first an internal
variable is properly set. Only then an update on the model is applied.

The largest part of this commit is a new test that reproducibly crashes
without the changed order of two instructions, but passes after the fix
has been applied.

This commit is a forward-port of commit 4aea6ed35b1629b3dba65a44 from
branch 'kbibtex/0.10'.

CCBUG: 433084
CCBUG: 453455

Gbp-Pq: Name 0001-Fixing-crash-when-opening-.bib-file.patch
src/test/CMakeLists.txt
src/test/kbibtexguitest.cpp [new file with mode: 0644]