diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 44806e7d23bfd05fd52678f5e8bc9b4eaf41c74f..b343c913e505369abcf22fced991be4126458281 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -336,7 +336,7 @@ void LLPanelEnvironmentInfo::refreshFromEstate()
 std::string LLPanelEnvironmentInfo::getNameForTrackIndex(S32 index)
 {
     std::string invname;
-    if (mCurrentEnvironment || index < LLSettingsDay::TRACK_WATER || index >= LLSettingsDay::TRACK_MAX)
+    if (!mCurrentEnvironment || index < LLSettingsDay::TRACK_WATER || index >= LLSettingsDay::TRACK_MAX)
     {
         invname = getString(STRING_EMPTY_NAME);
     }