diff --git a/cui/source/factory/cuiexp.cxx b/cui/source/factory/cuiexp.cxx index 3c8f89be234d..1ee11a656c75 100644 --- a/cui/source/factory/cuiexp.cxx +++ b/cui/source/factory/cuiexp.cxx @@ -57,11 +57,9 @@ namespace cui { - static AbstractDialogFactory_Impl* pFactory=nullptr; static AbstractDialogFactory_Impl* GetFactory() { - if ( !pFactory ) - pFactory = new AbstractDialogFactory_Impl; + static AbstractDialogFactory_Impl* pFactory = new AbstractDialogFactory_Impl; return pFactory; } }