From 3a077c0c3f41575cdce7e7e2f65916b0e8eb85dd Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 23 May 2016 15:16:01 +0200 Subject: [PATCH] tdf#99973 - Crash when changing Locale Setting in options regression from commit 0f672545 "clang-tidy modernize-loop-convert in toolkit to uui", probably because the list is being modified while the loop is executing Change-Id: I18cd21001aee132e06d577c469aed5eb46a16a7f Reviewed-on: https://gerrit.libreoffice.org/25368 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/config/options.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unotools/source/config/options.cxx b/unotools/source/config/options.cxx index e336775cf8e1..435a453219a5 100644 --- a/unotools/source/config/options.cxx +++ b/unotools/source/config/options.cxx @@ -68,9 +68,8 @@ void ConfigurationBroadcaster::NotifyListeners( sal_uInt32 nHint ) nHint |= m_nBlockedHint; m_nBlockedHint = 0; if ( mpList ) { - for (ConfigurationListener* n : *mpList) { - n->ConfigurationChanged( this, nHint ); - } + for ( size_t n = 0; n < mpList->size(); n++ ) + (*mpList)[ n ]->ConfigurationChanged( this, nHint ); } } }