Check for NULL is always a good idea... -_-

This commit is contained in:
Geoffrey Merck F4FXL - KC3FRA 2018-11-18 22:10:16 +01:00
parent 713f2958c2
commit f0ae853141

View file

@ -45,7 +45,7 @@ void CGatewayCache::update(const wxString& gateway, const wxString& address, DST
if(rec == NULL) {
rec = findByAddress(addr_in);//did this gateway punch to us and we do not have a gateway set for it ?
if(rec->getGateway().empty())
if(rec != NULL && rec->getGateway().empty())
rec->setGateway(gateway);
}