From a6dfe5a64ef984aa1a3169c72b490983662f899f Mon Sep 17 00:00:00 2001
From: Cinder <cinder@sdf.org>
Date: Sun, 28 Dec 2014 14:18:29 -0700
Subject: [PATCH] STORM-2098 - Don't enable object edit for an invalid agent

---
 doc/contributions.txt          | 1 +
 indra/newview/llviewermenu.cpp | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 18acb18911..db9558e9a2 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -325,6 +325,7 @@ Cinder Roxley
     STORM-2036
     STORM-2037
     STORM-2053
+    STORM-2098
 Clara Young
 Coaldust Numbers
     VWR-1095
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3abeba4b43..e190119bcd 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2830,6 +2830,8 @@ BOOL enable_object_build(void*)
 
 bool enable_object_edit()
 {
+	if (!isAgentAvatarValid()) return false;
+	
 	// *HACK:  The new "prelude" Help Islands have a build sandbox area,
 	// so users need the Edit and Create pie menu options when they are
 	// there.  Eventually this needs to be replaced with code that only 
-- 
GitLab