From 634d16d7a56e8ba72fda7b6f1896970b96b331ff Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sat, 28 Aug 2010 01:01:27 +0300 Subject: fixed crash when loading existing secret key --- options.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'options.cpp') diff --git a/options.cpp b/options.cpp index f902d59..9d9b952 100644 --- a/options.cpp +++ b/options.cpp @@ -625,6 +625,13 @@ static BOOL CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LP DBDeleteContactSetting(user_data[item_num+1], szGPGModuleName, "bAlwatsTrust"); { TCHAR *tmp; + + if(output.find("already in secret keyring") != string::npos) + { + MessageBox(0, _T("Key already in scret key ring."), _T("Info"), MB_OK); + DeleteFile(tmp2); + break; + } char *tmp2; string::size_type s = output.find("gpg: key ") + strlen("gpg: key "); string::size_type s2 = output.find(":", s); -- cgit v1.2.3