Fixed CID 1031: removed check _fDevice for NULL as we do new BList in constructor also removed temp var count as _fDevice->CountItems() should return 0 if empty

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27438 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Fredrik Modeen 2008-09-12 07:07:00 +00:00
parent 52a542adfc
commit c1d9a877a4

View File

@ -479,15 +479,9 @@ BSerialPort::WaitForInput(void)
int32 int32
BSerialPort::CountDevices() BSerialPort::CountDevices()
{ {
int32 count = 0;
// Refresh devices list // Refresh devices list
ScanDevices(); ScanDevices();
return _fDevices->CountItems();
if (_fDevices != NULL)
count = _fDevices->CountItems();
return count;
} }