diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index ddfc6c1cb..912d46546 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -255,13 +255,22 @@ PartitionCoreModule::doInit() DeviceList devices = PartUtils::getDevices( PartUtils::DeviceType::WritableOnly ); cDebug() << "LIST OF DETECTED DEVICES:"; - cDebug() << "node\tcapacity\tname\tprettyName"; + cDebug() << Logger::SubEntry << "node\tcapacity\tname\tprettyName"; for ( auto device : devices ) { - // Gives ownership of the Device* to the DeviceInfo object - auto deviceInfo = new DeviceInfo( device ); - m_deviceInfos << deviceInfo; - cDebug() << device->deviceNode() << device->capacity() << device->name() << device->prettyName(); + cDebug() << Logger::SubEntry << Logger::Pointer(device); + if ( device ) + { + // Gives ownership of the Device* to the DeviceInfo object + auto deviceInfo = new DeviceInfo( device ); + m_deviceInfos << deviceInfo; + cDebug() << Logger::SubEntry << device->deviceNode() << device->capacity() << device->name() + << device->prettyName(); + } + else + { + cDebug() << Logger::SubEntry << "(skipped null device)"; + } } cDebug() << Logger::SubEntry << devices.count() << "devices detected."; m_deviceModel->init( devices );