summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rwxr-xr-xindra/newview/llpreviewscript.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index b300f3a39c..5e7b148101 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -391,8 +391,14 @@ LLScriptEdCore::~LLScriptEdCore()
}
delete mLiveFile;
- mRegionChangedCallback.disconnect();
- mFileFetchedCallback.disconnect();
+ if (mRegionChangedCallback.connected())
+ {
+ mRegionChangedCallback.disconnect();
+ }
+ if (mFileFetchedCallback.connected())
+ {
+ mFileFetchedCallback.disconnect();
+ }
}
BOOL LLScriptEdCore::postBuild()
@@ -424,21 +430,13 @@ BOOL LLScriptEdCore::postBuild()
{
processKeywords();
}
- mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this));
-
- return TRUE;
-}
-
-void LLScriptEdCore::updateKeywords()
-{
+
if (mLive)
{
- mEditor->clearSegments();
- }
- else
- {
- processLoaded();
+ mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::processLoaded, this));
}
+
+ return TRUE;
}
void LLScriptEdCore::processLoaded()