diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 97f1dcd5d040ab74e3104b2cd54d97d5f6eba94d..7f01438425c9bd56bec4b7a4ced869c95dbd5b42 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -44,8 +44,7 @@ extern LLAgent gAgent;
 const S32 ADVANCED_VPAD = 3;
 
 LLPreviewAnim::LLPreviewAnim(const LLSD& key)
-	: LLPreview( key ),
-	pMotion(NULL)
+	: LLPreview( key )
 {
 	mCommitCallbackRegistrar.add("PreviewAnim.Play", boost::bind(&LLPreviewAnim::play, this, _2));
 }
@@ -172,7 +171,7 @@ void LLPreviewAnim::refreshFromItem()
     }
 
     // Preload motion
-    pMotion = gAgentAvatarp->createMotion(item->getAssetUUID());
+    gAgentAvatarp->createMotion(item->getAssetUUID());  
 
     LLPreview::refreshFromItem();
 }
@@ -215,15 +214,24 @@ void LLPreviewAnim::showAdvanced()
         LLRect rect = getRect();
         reshape(rect.getWidth(), rect.getHeight() + pAdvancedStatsTextBox->getRect().getHeight() + ADVANCED_VPAD, FALSE);
 
+        LLMotion *motion = NULL;
+        const LLInventoryItem* item = getItem();
+        if (item)
+        {
+            // if motion exists, will return existing one.
+            // Needed because viewer can purge motions
+            motion = gAgentAvatarp->createMotion(item->getAssetUUID());
+        }
+
         // set text
-        if (pMotion)
+        if (motion)
         {
-            pAdvancedStatsTextBox->setTextArg("[PRIORITY]", llformat("%d", pMotion->getPriority()));
-            pAdvancedStatsTextBox->setTextArg("[DURATION]", llformat("%.2f", pMotion->getDuration()));
-            pAdvancedStatsTextBox->setTextArg("[EASE_IN]", llformat("%.2f", pMotion->getEaseInDuration()));
-            pAdvancedStatsTextBox->setTextArg("[EASE_OUT]", llformat("%.2f", pMotion->getEaseOutDuration()));
-            pAdvancedStatsTextBox->setTextArg("[IS_LOOP]", (pMotion->getLoop() ? LLTrans::getString("PermYes") : LLTrans::getString("PermNo")));
-            pAdvancedStatsTextBox->setTextArg("[NUM_JOINTS]", llformat("%d", pMotion->getNumJointMotions()));
+            pAdvancedStatsTextBox->setTextArg("[PRIORITY]", llformat("%d", motion->getPriority()));
+            pAdvancedStatsTextBox->setTextArg("[DURATION]", llformat("%.2f", motion->getDuration()));
+            pAdvancedStatsTextBox->setTextArg("[EASE_IN]", llformat("%.2f", motion->getEaseInDuration()));
+            pAdvancedStatsTextBox->setTextArg("[EASE_OUT]", llformat("%.2f", motion->getEaseOutDuration()));
+            pAdvancedStatsTextBox->setTextArg("[IS_LOOP]", (motion->getLoop() ? LLTrans::getString("PermYes") : LLTrans::getString("PermNo")));
+            pAdvancedStatsTextBox->setTextArg("[NUM_JOINTS]", llformat("%d", motion->getNumJointMotions()));
         }
     }
 }
diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h
index 14cd53b500b8a73d48762f5976f130051139c26c..9f4ad4fa6918bc2047d84930a1cfb4fdf52ee97e 100644
--- a/indra/newview/llpreviewanim.h
+++ b/indra/newview/llpreviewanim.h
@@ -51,7 +51,6 @@ class LLPreviewAnim : public LLPreview
 	
 	LLUUID	mItemID; // Not an item id, but a playing asset id
 	bool	mDidStart;
-	LLMotion* pMotion;
 	LLTextBox* pAdvancedStatsTextBox;
 };