mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 20:11:11 +00:00
Bugfix: crash when apcupsd isnt running
This commit is contained in:
parent
a1ddcc0786
commit
90f5701f3e
@ -181,7 +181,7 @@ void update_apcupsd(void) {
|
||||
break;
|
||||
}
|
||||
#ifdef HAVE_GETHOSTBYNAME_R
|
||||
if (gethostbyname_r(info.apcupsd.host, &he_mem, hostbuff, sizeof(hostbuff), &he, &he_errno)) {
|
||||
if (gethostbyname_r(info.apcupsd.host, &he_mem, hostbuff, sizeof(hostbuff), &he, &he_errno) || !he ) {
|
||||
NORM_ERR("APCUPSD gethostbyname_r: %s", hstrerror(h_errno));
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user