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:
rudolfkoenig
2013-01-04 06:57:32 +00:00
parent 27e83fa13a
commit b76a6193f8

View File

@@ -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);
}
########################