include/unotools/VersionConfig.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit ab32d1c01814d576b0b82c99e1849a8a71b12188 Author: homeboy445 <[email protected]> AuthorDate: Mon Nov 1 21:08:23 2021 +0530 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Tue Nov 2 07:47:41 2021 +0100 tdf#145486: Prevented crash by not updating readOnly value Change-Id: I88c2b8a9a05335a16154a23a541882a3ca6de3e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124555 Tested-by: Julien Nabet <[email protected]> Reviewed-by: Julien Nabet <[email protected]> Reviewed-by: Samuel Mehrbrodt <[email protected]> diff --git a/include/unotools/VersionConfig.hxx b/include/unotools/VersionConfig.hxx index 60b3a36c51e0..c3bdeea48fea 100644 --- a/include/unotools/VersionConfig.hxx +++ b/include/unotools/VersionConfig.hxx @@ -31,7 +31,7 @@ static bool isProductVersionUpgraded(bool aUpdateVersion) = sLastVersion.getToken(0, '.').toInt32() * 10 + sLastVersion.getToken(1, '.').toInt32(); if (iCurrent > iLast) { - if (aUpdateVersion) + if (aUpdateVersion && !officecfg::Setup::Product::ooSetupLastVersion::isReadOnly()) { //update lastversion std::shared_ptr<comphelper::ConfigurationChanges> batch( comphelper::ConfigurationChanges::create());
