From fb7dec06c8d9df3411c43c87c5d106a14c9562fe Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 21 Jul 2012 18:58:50 +0200 Subject: [PATCH] PushDlg: Prevent users from pushing if no remote archive is selected Signed-off-by: Sven Strickroth --- src/TortoiseProc/PushDlg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/TortoiseProc/PushDlg.cpp b/src/TortoiseProc/PushDlg.cpp index 1360f54bf..ef155b202 100644 --- a/src/TortoiseProc/PushDlg.cpp +++ b/src/TortoiseProc/PushDlg.cpp @@ -314,6 +314,11 @@ void CPushDlg::OnBnClickedOk() if( GetCheckedRadioButton(IDC_RD_REMOTE,IDC_RD_URL) == IDC_RD_REMOTE) { m_URL=m_Remote.GetString(); + if (m_URL.IsEmpty()) + { + CMessageBox::Show(NULL, IDS_PROC_GITCONFIG_REMOTEEMPTY, IDS_APPNAME, MB_OK); + return; + } m_bPushAllRemotes = (m_Remote.GetCurSel() == 0 && m_Remote.GetCount() > 1); } if( GetCheckedRadioButton(IDC_RD_REMOTE,IDC_RD_URL) == IDC_RD_URL) -- 2.11.4.GIT