From f4a702e212d1853735f8dae399da69d23bfa510e Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 18:16:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into h5version
---
Main/System/Message/RichTextMgr.cs | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/Main/System/Message/RichTextMgr.cs b/Main/System/Message/RichTextMgr.cs
index b566100..438de3e 100644
--- a/Main/System/Message/RichTextMgr.cs
+++ b/Main/System/Message/RichTextMgr.cs
@@ -152,7 +152,20 @@
public bool ExecuteEvent(RichTextEventEnum type,HrefInfo href)
{
- return m_RichEvents[type].Execute(type,href);
+ if (m_RichEvents == null || !m_RichEvents.ContainsKey(type))
+ {
+ Debug.LogWarning($"RichTextMgr: Event type {type} not registered");
+ return false;
+ }
+
+ var evt = m_RichEvents[type];
+ if (evt == null)
+ {
+ Debug.LogWarning($"RichTextMgr: Event handler for {type} is null");
+ return false;
+ }
+
+ return evt.Execute(type, href);
}
public string GetDisplay(RichTextEventEnum type,Dictionary<string,string> dic)
--
Gitblit v1.8.0