From ed2d8259ae377c0b247f11c12be1797e06b5614c Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 13 Nov 2023 22:49:14 -0500
Subject: [PATCH] RLV fix

---
 indra/newview/rlvactions.cpp | 2 +-
 indra/newview/rlvhandler.cpp | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp
index a626f89fe83..995939c9df7 100644
--- a/indra/newview/rlvactions.cpp
+++ b/indra/newview/rlvactions.cpp
@@ -242,7 +242,7 @@ bool RlvActions::canShowName(EShowNamesContext eContext, const LLUUID& idAgent)
 			case SNC_TELEPORTREQUEST:
 				return gRlvHandler.isException(RLV_BHVR_SHOWNAMES, idAgent) || (gAgentID == idAgent);
 			default:
-				return true;
+				return false;
 		}
 	}
 	return false;
diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp
index 1c6b6eff329..8bd2ec4c848 100644
--- a/indra/newview/rlvhandler.cpp
+++ b/indra/newview/rlvhandler.cpp
@@ -475,6 +475,13 @@ ERlvCmdRet RlvHandler::processCommand(std::reference_wrapper<const RlvCommand> r
 		case RLV_TYPE_ADD:		// Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
 			{
 				ERlvBehaviour eBhvr = rlvCmd.get().getBehaviourType();
+				if(eBhvr == RLV_BHVR_UNKNOWN)
+				{
+					eRet = RLV_RET_FAILED_PARAM;
+					RLV_DEBUGS << "\t- " << rlvCmd.get().getBehaviour() << " is UNKNOWN => Call Kitty!" << RLV_ENDL;
+					break;
+				}
+
 				if ( (m_Behaviours[eBhvr]) && ( (RLV_BHVR_SETCAM == eBhvr) || (RLV_BHVR_SETDEBUG == eBhvr) || (RLV_BHVR_SETENV == eBhvr) ) )
 				{
 					// Some restrictions can only be held by one single object to avoid deadlocks
-- 
GitLab