1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 11:17:31 +01:00

fixes #521 Added checks for the condition that caused crash

This commit is contained in:
Vadim Kurland 2009-10-09 19:19:16 +00:00
parent 4fc1735694
commit ac59f38634
2 changed files with 14 additions and 6 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 1567
#define BUILD_NUM 1568

View File

@ -1392,9 +1392,13 @@ void ObjectManipulator::contextMenuRequested(const QPoint &pos)
if (Firewall::cast(currentObj)!=NULL)
{
string transfer = Resources::os_res[currentObj->getStr("host_OS")]->getTransferAgent();
if (!transfer.empty())
popup->addAction( tr("Transfer"), this, SLOT(transferfw()));
Resources* os_res = Resources::os_res[currentObj->getStr("host_OS")];
if (os_res)
{
string transfer = os_res->getTransferAgent();
if (!transfer.empty())
popup->addAction( tr("Transfer"), this, SLOT(transferfw()));
}
}
if (ObjectGroup::cast(currentObj)!=NULL && currentObj->getName()=="Firewalls")
@ -1406,8 +1410,12 @@ void ObjectManipulator::contextMenuRequested(const QPoint &pos)
it!=currentObj->end(); ++it)
{
FWObject *fw = *it;
string transfer = Resources::os_res[fw->getStr("host_OS")]->getTransferAgent();
have_transfer_support = have_transfer_support || (!transfer.empty());
Resources* os_res = Resources::os_res[fw->getStr("host_OS")];
if (os_res)
{
string transfer = os_res->getTransferAgent();
have_transfer_support = have_transfer_support || (!transfer.empty());
}
}
if (have_transfer_support)
popup->addAction( tr("Transfer"), this, SLOT(transferfw()));