Fix for crash on Windows if CUN is not reachable at start. Not tested
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2427 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
########################
|
||||
|
||||
Reference in New Issue
Block a user