From 534f22038ccda755c71e253fc3606ccb687cba3d Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 15 Oct 2016 09:27:30 +0200 Subject: [PATCH] Catalog stub: fix undefinied initiamization order. As investigated by korli in #13001. --- src/kits/locale/CatalogStub.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kits/locale/CatalogStub.cpp b/src/kits/locale/CatalogStub.cpp index 0e07bbc551..d719562533 100644 --- a/src/kits/locale/CatalogStub.cpp +++ b/src/kits/locale/CatalogStub.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2014, Adrien Destugues . + * Copyright 2010-2016, Adrien Destugues . * Distributed under the terms of the MIT License. */ @@ -10,13 +10,14 @@ #include -static BCatalog sCatalog; static int32 sCatalogInitOnce = INIT_ONCE_UNINITIALIZED; BCatalog* BLocaleRoster::GetCatalog() { + static BCatalog sCatalog; + #if (__GNUC__ < 3) asm volatile(".hidden GetCatalog__13BLocaleRoster"); #else