summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloateravatar.cpp14
-rw-r--r--indra/newview/llfloateravatar.h3
2 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
index 31adf5b61e..f888d032ae 100644
--- a/indra/newview/llfloateravatar.cpp
+++ b/indra/newview/llfloateravatar.cpp
@@ -44,17 +44,21 @@ LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
LLFloaterAvatar::~LLFloaterAvatar()
{
- LLMediaCtrl* avatar_picker = findChild<LLMediaCtrl>("avatar_picker_contents");
- if (avatar_picker)
+ if (mAvatarPicker)
{
- avatar_picker->navigateStop();
- avatar_picker->clearCache(); //images are reloading each time already
- avatar_picker->unloadMediaSource();
+ mAvatarPicker->navigateStop();
+ mAvatarPicker->clearCache(); //images are reloading each time already
+ mAvatarPicker->unloadMediaSource();
}
}
BOOL LLFloaterAvatar::postBuild()
{
+ mAvatarPicker = findChild<LLMediaCtrl>("avatar_picker_contents");
+ if (mAvatarPicker)
+ {
+ mAvatarPicker->clearCache();
+ }
enableResizeCtrls(true, true, false);
return TRUE;
}
diff --git a/indra/newview/llfloateravatar.h b/indra/newview/llfloateravatar.h
index cadc5e4028..76e9372709 100644
--- a/indra/newview/llfloateravatar.h
+++ b/indra/newview/llfloateravatar.h
@@ -29,6 +29,7 @@
#define LL_FLOATER_AVATAR_H
#include "llfloater.h"
+class LLMediaCtrl;
class LLFloaterAvatar:
public LLFloater
@@ -38,6 +39,8 @@ private:
LLFloaterAvatar(const LLSD& key);
/*virtual*/ ~LLFloaterAvatar();
/*virtual*/ BOOL postBuild();
+
+ LLMediaCtrl* mAvatarPicker;
};
#endif