File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 193193
194194-- 初始化/生效 设置
195195function D .Apply ()
196- local shaBack = X .GetChatPanel (1 ): Lookup ( ' Wnd_Message ' , ' Shadow_Back ' )
196+ local hFrame = X .GetChatPanel (1 )
197197 local editInput = X .GetChatInput ()
198- if not shaBack or not editInput then
198+ if not hFrame or not editInput then
199+ return
200+ end
201+ local shaBack = hFrame :Lookup (' Wnd_Message' , ' Shadow_Back' )
202+ if not shaBack then
199203 return
200204 end
201205 if O .bEnable then
Original file line number Diff line number Diff line change 218218
219219function D .CheckNamelinkEnable ()
220220 for _ , k in X .pairs_c (X .CONSTANT .CHAT_PANEL_INDEX_LIST ) do
221- local h = X .GetChatPanel (k ):Lookup (' Wnd_Message' , ' Handle_Message' )
221+ local hFrame = X .GetChatPanel (k )
222+ local h = hFrame and hFrame :Lookup (' Wnd_Message' , ' Handle_Message' )
222223 if h then
223224 D .CheckNamelinkHook (h , 0 )
224225 end
Original file line number Diff line number Diff line change @@ -84,7 +84,10 @@ function D.ResetMosaics()
8484 -- re mosaics
8585 D .bForceUpdate = true
8686 for _ , k in X .pairs_c (X .CONSTANT .CHAT_PANEL_INDEX_LIST ) do
87- D .Mosaics (X .GetChatPanel (k ):Lookup (' Wnd_Message' , ' Handle_Message' ))
87+ local hFrame = X .GetChatPanel (k )
88+ if hFrame then
89+ D .Mosaics (hFrame :Lookup (' Wnd_Message' , ' Handle_Message' ))
90+ end
8891 end
8992 D .bForceUpdate = nil
9093 -- hook chat panel
You can’t perform that action at this time.
0 commit comments