* UControl: 修复关闭弹窗null的Bug

This commit is contained in:
Sunny 2023-04-02 21:40:31 +08:00
parent 81dbcbf0e3
commit dac28c7c62

View File

@ -17,6 +17,7 @@
* : 2020-01-01 * : 2020-01-01
* *
* 2020-01-01: V2.2.0 * 2020-01-01: V2.2.0
* 2023-04-02: V3.3.4 null的Bug
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -388,7 +389,8 @@ namespace Sunny.UI
internal static void HideComboDropDown(this Control ctrl) internal static void HideComboDropDown(this Control ctrl)
{ {
var ctrls = ctrl.FindForm()?.GetInterfaceControls("IHideDropDown", true); var ctrls = ctrl?.FindForm()?.GetInterfaceControls("IHideDropDown", true);
if (ctrls == null) return;
foreach (var control in ctrls) foreach (var control in ctrls)
{ {
if (control is IHideDropDown item) if (control is IHideDropDown item)