From b4d8535cc950abbca752b2d02b116a6ff1a65bb0 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Tue, 18 Aug 2015 05:53:22 +0000 Subject: [PATCH] fhem.pl: avoid some "undefined" messages (Forum #39887) git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9090 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/fhem.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 8237866d3..dc76c8245 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -635,6 +635,7 @@ while (1) { # reported by select, but is used by unix too, to check if the device is # attached again. foreach my $p (keys %selectlist) { + next if(!$p); # Deleted in the loop my $hash = $selectlist{$p}; my $isDev = ($hash && $hash->{NAME} && $defs{$hash->{NAME}}); my $isDirect = ($hash && ($hash->{directReadFn} || $hash->{directWriteFn})); @@ -2661,6 +2662,7 @@ HandleTimeout() # Check the internal list. foreach my $i (sort { $intAt{$a}{TRIGGERTIME} <=> $intAt{$b}{TRIGGERTIME} } keys %intAt) { + next if(!$i || !$intAt{$i}); # deleted in the loop my $tim = $intAt{$i}{TRIGGERTIME}; my $fn = $intAt{$i}{FN}; if(!defined($tim) || !defined($fn)) {