From adcc6a75c90ad3f722081dfe8ee4e18ed7d3349c Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Wed, 7 Oct 2020 20:51:49 +0800 Subject: [PATCH] fix: MainForm Text reload got exception when increase profile count #389 --- Netch/Forms/MainForm.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index 28b385b4..fcb916bc 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -234,11 +234,12 @@ namespace Netch.Forms case ListControl _: break; case Control c: - - c.Text = ControlText(c.Name); + if (_mainFormText.ContainsKey(c.Name)) + c.Text = ControlText(c.Name); break; case ToolStripItem c: - c.Text = ControlText(c.Name); + if (_mainFormText.ContainsKey(c.Name)) + c.Text = ControlText(c.Name); break; }