From 2bb2ff25cf2a3cf544fcb751859d944b9139382f Mon Sep 17 00:00:00 2001 From: lsv Date: Thu, 29 Dec 2022 17:33:29 +0500 Subject: [PATCH] fix GitLab connect error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Окно информации при ошибке соединения с GitLab. --- ctl/ctlGitPanel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ctl/ctlGitPanel.cpp b/ctl/ctlGitPanel.cpp index 36401c7..67f8b30 100644 --- a/ctl/ctlGitPanel.cpp +++ b/ctl/ctlGitPanel.cpp @@ -551,6 +551,11 @@ ctlGitPanel::ctlGitPanel(wxWindow* parent, frmMain* form, wxJSONValue cf) : &ctlGitPanel::OnProgressTimer, this); GetBranchList(true); + if (!error_msg.IsEmpty()) { + // error connect + wxLogError("GitLab connect error.\n%s", error_msg); + return; + } // load pgadmin3.json wxString jsonText = GetRepositoryFile("main", "pgadmin3.json"); if (!jsonText.IsEmpty()) { @@ -760,6 +765,8 @@ void ctlGitPanel::GetBranchList(bool refresh) { break; } } + if (currentDBname.IsEmpty()) return; + if (i >= m_Branch_List_Ctrl->GetCount()) { CommandBranch(currentDBname, "create"); m_Branch_List_Ctrl->Append(currentDBname);