1
0
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:
Jordan K. Hubbard 1999-11-08 16:19:25 +00:00
parent 7a88382dc3
commit 29527eb44c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53019
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;