00_TCM: ARRAY reference error corrected

git-svn-id: https://svn.fhem.de/fhem/trunk@25016 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klaus.schauer 2021-09-24 14:42:44 +00:00
parent 1f63e95c9c
commit 8545a5edf4

View File

@ -1553,6 +1553,7 @@ sub TCM_Undef($$) {
last; last;
} }
} }
if (exists $modules{"$hash->{TYPE}"}{ChipID}) {
for (my $i = 0; $i <= @{$modules{"$hash->{TYPE}"}{ChipID}}; $i++) { for (my $i = 0; $i <= @{$modules{"$hash->{TYPE}"}{ChipID}}; $i++) {
if (${$modules{"$hash->{TYPE}"}{ChipID}}[$i] eq $hash->{ChipID}) { if (${$modules{"$hash->{TYPE}"}{ChipID}}[$i] eq $hash->{ChipID}) {
Log3 $name, 4, "TCM $name remove module ChipID: " . ${$modules{"$hash->{TYPE}"}{ChipID}}[$i]; Log3 $name, 4, "TCM $name remove module ChipID: " . ${$modules{"$hash->{TYPE}"}{ChipID}}[$i];
@ -1560,6 +1561,7 @@ sub TCM_Undef($$) {
last; last;
} }
} }
}
RemoveInternalTimer($hash, 'TCM_msgCounter'); RemoveInternalTimer($hash, 'TCM_msgCounter');
delete $hash->{helper}{init_done}; delete $hash->{helper}{init_done};
return undef; return undef;