diff --git a/indra/newview/fsgridhandler.cpp b/indra/newview/fsgridhandler.cpp
index efb0bc3c96..da65f03dbd 100644
--- a/indra/newview/fsgridhandler.cpp
+++ b/indra/newview/fsgridhandler.cpp
@@ -193,6 +193,12 @@ void LLGridManager::initGrids()
{
initCmdLineGrids();
}
+
+ // FIRE-20112 in case grid was set bt settings/cmd line, set it now
+ if( mStartupGrid.size() )
+ setGridChoice( mStartupGrid );
+ mStartupGrid = "";
+ //
}
@@ -1052,6 +1058,14 @@ void LLGridManager::setGridChoice(const std::string& grid)
return;
}
+ // FIRE-20112 viewer is not properly initialized yet, store grid choice and call this method again later.
+ if( mGridList.size() == 0 )
+ {
+ mStartupGrid = grid;
+ return;
+ }
+ //
+
// Set the grid choice based on a string.
// The string can be:
// - a grid label from the gGridInfo table
diff --git a/indra/newview/fsgridhandler.h b/indra/newview/fsgridhandler.h
index 9424787f57..a78dcae79f 100644
--- a/indra/newview/fsgridhandler.h
+++ b/indra/newview/fsgridhandler.h
@@ -290,6 +290,7 @@ protected:
std::string mGrid;
std::string mGridFile;
+ std::string mStartupGrid;
LLSD mGridList;
//
LLSD mConnectedGrid;