From dfaff8e8f5c9eeea98bd8731eb396727f237ab36 Mon Sep 17 00:00:00 2001 From: mgehre <> Date: Wed, 26 Nov 2014 19:50:04 +0000 Subject: [PATCH] MAX: more robustness checks git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@7068 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_MAX.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/10_MAX.pm b/FHEM/10_MAX.pm index 50adfec5c..450d28709 100755 --- a/FHEM/10_MAX.pm +++ b/FHEM/10_MAX.pm @@ -596,10 +596,8 @@ MAX_Parse($$) return () if($MAX ne "MAX"); Log3 $hash, 5, "MAX_Parse $msg"; - #Find the device with the given addr - my $shash = $modules{MAX}{defptr}{$addr}; - if(!$shash) + if(!exists($modules{MAX}{defptr}{$addr})) { my $devicetype = undef; $devicetype = $args[0] if($msgtype eq "define" and $args[0] ne "Cube"); @@ -614,6 +612,8 @@ MAX_Parse($$) } } + my $shash = $modules{MAX}{defptr}{$addr}; + #if $isToMe is true, then the message was directed at device $hash, thus we can also use it for sending if($isToMe) { $shash->{IODev} = $hash;