Salome HOME
updated copyright message
[modules/gui.git] / src / Style / Style_ResourceMgr.cxx
index 7ed6d7321084a745e4f2aaf393755146cdeb2368..9fd95076f72cef41b8f5b1292a897adb470820cc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -43,8 +43,9 @@
 Style_ResourceMgr::Style_ResourceMgr()
   : QtxResourceMgr( "SalomeStyle", "%1Config" )
 {
-  if ( dirList().isEmpty() && ::getenv( "GUI_ROOT_DIR" ) )
-    setDirList( QStringList() << Qtx::addSlash( ::getenv( "GUI_ROOT_DIR" ) ) + "share/salome/resources/gui" );
+  QString gui_root = Qtx::getenv( "GUI_ROOT_DIR" );
+  if ( dirList().isEmpty() && !gui_root.isEmpty() )
+    setDirList( QStringList() << Qtx::addSlash( gui_root ) + "share/salome/resources/gui" );
   setCurrentFormat( "xml" );
 }