Fix NPE when getting port mappings

master
kaklakariada 2015-12-26 11:46:12 +01:00
parent d34eba7c58
commit 8dd04c5290
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ public class WeUPnPRouter extends AbstractRouter {
+ ", stop getting more mappings");
}
if (entry != null) {
if (entry.getProtocol() != null) {
final Protocol protocol = entry.getProtocol().equalsIgnoreCase("TCP") ? Protocol.TCP : Protocol.UDP;
final PortMapping m = new PortMapping(protocol, entry.getRemoteHost(), entry.getExternalPort(),
entry.getInternalClient(), entry.getInternalPort(), entry.getPortMappingDescription());