summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-30 09:08:56 -0800
committerGraham Linden <graham@lindenlab.com>2018-11-30 09:08:56 -0800
commit79049c49bd34d58c3a3140d4fc50f586e45f3047 (patch)
treebb1941153a12040abb44f66e25a4255e2f7bad54 /indra/newview/llpreviewnotecard.cpp
parent65d56f53cd9a2028af177ec0315b721f59868d19 (diff)
parentd66012f85e885679738cf8c488fd8ff460319c85 (diff)
Merge
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
-rw-r--r--indra/newview/llpreviewnotecard.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index fec16998d6..9a0a80147a 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -110,13 +110,15 @@ bool LLPreviewNotecard::saveItem()
void LLPreviewNotecard::setEnabled( BOOL enabled )
{
-
- LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
-
- getChildView("Notecard Editor")->setEnabled(enabled);
- getChildView("lock")->setVisible( !enabled);
- getChildView("desc")->setEnabled(enabled);
- getChildView("Save")->setEnabled(enabled && editor && (!editor->isPristine()));
+ LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
+ // editor is part of xml, if it doesn't exists, nothing else does
+ if (editor)
+ {
+ editor->setEnabled(enabled);
+ getChildView("lock")->setVisible( !enabled);
+ getChildView("desc")->setEnabled(enabled);
+ getChildView("Save")->setEnabled(enabled && (!editor->isPristine()));
+ }
}