mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Defensive coding to prevent a potential segfault.
PR: 14706 Submitted by: ru
This commit is contained in:
parent
7a88382dc3
commit
29527eb44c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53019
@ -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…
Reference in New Issue
Block a user