summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewtexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewtexture.cpp')
-rw-r--r--indra/newview/llpreviewtexture.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index a50ded3b53..d1817c8cda 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -157,9 +157,12 @@ void LLPreviewTexture::init()
{
LLInventoryItem* item = getItem();
- childSetCommitCallback("desc", LLPreview::onText, this);
- childSetText("desc", item->getDescription());
- childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
+ if (item)
+ {
+ childSetCommitCallback("desc", LLPreview::onText, this);
+ childSetText("desc", item->getDescription());
+ childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
+ }
}
}