Fixed SIGSEGV fault, thx to Phenom for the Patch ( FixConfCertDialog_SIGSEGV_v0.6.patch )

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7263 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-04-11 11:47:46 +00:00
parent 9ea4ab24e0
commit d1e526cdf7

View File

@ -118,19 +118,19 @@ ConfCertDialog::ConfCertDialog(const RsPeerId& id, const RsPgpId &pgp_id, QWidge
connect(this, SIGNAL(configChanged()), w->getPage(MainWindow::Network), SLOT(insertConnect()));
}
}
ConfCertDialog::~ConfCertDialog()
{
if(peerId.isNull())
{
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
if (it != instances_ssl.end())
instances_ssl.erase(it);
}
else
{
QMap<RsPgpId, ConfCertDialog*>::iterator it = instances_pgp.find(pgpId);
if (it != instances_pgp.end())
ConfCertDialog::~ConfCertDialog()
{
// if(peerId.isNull())
{
QMap<RsPeerId, ConfCertDialog*>::iterator it = instances_ssl.find(peerId);
if (it != instances_ssl.end())
instances_ssl.erase(it);
}
// else
{
QMap<RsPgpId, ConfCertDialog*>::iterator it = instances_pgp.find(pgpId);
if (it != instances_pgp.end())
instances_pgp.erase(it);
}
}
@ -155,14 +155,12 @@ void ConfCertDialog::loadAll()
}
void ConfCertDialog::load()
{
RsPeerDetails detail;
bool ok = false ;
if(!(rsPeers->getPeerDetails(peerId, detail) || rsPeers->getGPGDetails(pgpId, detail)))
{
QMessageBox::information(this,
{
RsPeerDetails detail;
if(!(rsPeers->getPeerDetails(peerId, detail) || rsPeers->getGPGDetails(pgpId, detail)))
{
QMessageBox::information(this,
tr("RetroShare"),
tr("Error : cannot get peer details."));
close();