Defensive coding to prevent a potential segfault.
PR: 14706 Submitted by: ru
This commit is contained in:
parent
934bb28b94
commit
8417239202
@ -478,7 +478,7 @@ tcpMenuSelect(dialogMenuItem *self)
|
||||
Device *tmp;
|
||||
|
||||
tmp = tcpDeviceSelect();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && tmp->private && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
|
@ -478,7 +478,7 @@ tcpMenuSelect(dialogMenuItem *self)
|
||||
Device *tmp;
|
||||
|
||||
tmp = tcpDeviceSelect();
|
||||
if (tmp && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (tmp && tmp->private && !((DevInfo *)tmp->private)->use_dhcp && !msgYesNo("Would you like to bring the %s interface up right now?", tmp->name))
|
||||
if (!tmp->init(tmp))
|
||||
msgConfirm("Initialization of %s device failed.", tmp->name);
|
||||
return DITEM_SUCCESS | DITEM_RESTORE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user