2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

36_EleroStick: fixed crash when undefining

git-svn-id: https://svn.fhem.de/fhem/trunk@12725 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
hcs-svn 2016-12-07 20:37:31 +00:00
parent 0d70e1da9d
commit 562ea9a6c4

View File

@ -164,9 +164,11 @@ sub EleroStick_Define($$) {
#=======================================================================================
sub EleroStick_Undef($$) {
my ( $hash, $arg ) = @_;
DevIo_CloseDev($hash);
RemoveInternalTimer($hash);
my ( $hash, $arg ) = @_;
if($hash->{STATE} ne "disconnected") {
DevIo_CloseDev($hash);
}
RemoveInternalTimer($hash);
return undef;
}