aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterimagepreview.cpp')
-rw-r--r--linden/indra/newview/llfloaterimagepreview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp
index d2038de..7dce9a5 100644
--- a/linden/indra/newview/llfloaterimagepreview.cpp
+++ b/linden/indra/newview/llfloaterimagepreview.cpp
@@ -52,6 +52,7 @@
52#include "llui.h" 52#include "llui.h"
53#include "llviewercamera.h" 53#include "llviewercamera.h"
54#include "llviewerwindow.h" 54#include "llviewerwindow.h"
55#include "llviewerobjectlist.h"
55#include "llvoavatar.h" 56#include "llvoavatar.h"
56#include "pipeline.h" 57#include "pipeline.h"
57#include "lluictrlfactory.h" 58#include "lluictrlfactory.h"
@@ -107,7 +108,7 @@ BOOL LLFloaterImagePreview::postBuild()
107 108
108 childHide("bad_image_text"); 109 childHide("bad_image_text");
109 110
110 if (mRawImagep.notNull()) 111 if (mRawImagep.notNull() && gAgent.getRegion() != NULL)
111 { 112 {
112 mAvatarPreview = new LLImagePreviewAvatar(256, 256); 113 mAvatarPreview = new LLImagePreviewAvatar(256, 256);
113 mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE); 114 mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE);
@@ -609,7 +610,7 @@ LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLDynamicTex
609 mCameraPitch = 0.f; 610 mCameraPitch = 0.f;
610 mCameraZoom = 1.f; 611 mCameraZoom = 1.f;
611 612
612 mDummyAvatar = new LLVOAvatar(LLUUID::null, LL_PCODE_LEGACY_AVATAR, gAgent.getRegion()); 613 mDummyAvatar = (LLVOAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion());
613 mDummyAvatar->createDrawable(&gPipeline); 614 mDummyAvatar->createDrawable(&gPipeline);
614 mDummyAvatar->mIsDummy = TRUE; 615 mDummyAvatar->mIsDummy = TRUE;
615 mDummyAvatar->mSpecialRenderMode = 2; 616 mDummyAvatar->mSpecialRenderMode = 2;