mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
Fix for crash on Windows if CUN is not reachable at start. Not tested
git-svn-id: https://svn.fhem.de/fhem/trunk@2427 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
59cadd74e4
commit
ad0e5917b4
@ -949,8 +949,11 @@ CUL_Ready($)
|
||||
|
||||
# This is relevant for windows/USB only
|
||||
my $po = $hash->{USBDev};
|
||||
my ($BlockingFlags, $InBytes, $OutBytes, $ErrorFlags) = $po->status;
|
||||
return ($InBytes>0);
|
||||
my ($BlockingFlags, $InBytes, $OutBytes, $ErrorFlags);
|
||||
if($po) {
|
||||
($BlockingFlags, $InBytes, $OutBytes, $ErrorFlags) = $po->status;
|
||||
}
|
||||
return ($InBytes && $InBytes>0);
|
||||
}
|
||||
|
||||
########################
|
||||
|
Loading…
x
Reference in New Issue
Block a user