From kde-commits Thu Jul 12 06:25:07 2012 From: Alexander Dymo Date: Thu, 12 Jul 2012 06:25:07 +0000 To: kde-commits Subject: [kdev-ruby/gsoc] duchain/builders: Obtain duchain r/w lock before adding module mixin to the module Message-Id: <20120712062507.12103A6094 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=134207455523585 Git commit 0b171abe1c9806cd5c3f981966319350580ab85a by Alexander Dymo. Committed on 12/07/2012 at 08:21. Pushed by dymo into branch 'gsoc'. Obtain duchain r/w lock before adding module mixin to the module declaration M +1 -0 duchain/builders/declarationbuilder.cpp http://commits.kde.org/kdev-ruby/0b171abe1c9806cd5c3f981966319350580ab85a diff --git a/duchain/builders/declarationbuilder.cpp b/duchain/builders/dec= larationbuilder.cpp index 75bfc9d..24a9b46 100644 --- a/duchain/builders/declarationbuilder.cpp +++ b/duchain/builders/declarationbuilder.cpp @@ -732,6 +732,7 @@ void DeclarationBuilder::registerModuleMixin(ModuleDecl= aration *decl, bool inclu if (lastClassModule) { ModuleDeclaration *current =3D dynamic_cast(l= astClassModule); if (current) { + DUChainWriteLocker lock(DUChain::lock()); ModuleMixin mixin; mixin.included =3D include; mixin.module =3D decl->indexedType();