mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
[partition] Avoid crash when there is no KPM backend
This commit is contained in:
parent
ede19c8a61
commit
3d0709c779
1 changed files with 5 additions and 0 deletions
|
@ -112,6 +112,11 @@ QList< Device* >
|
||||||
getDevices( DeviceType which )
|
getDevices( DeviceType which )
|
||||||
{
|
{
|
||||||
CoreBackend* backend = CoreBackendManager::self()->backend();
|
CoreBackend* backend = CoreBackendManager::self()->backend();
|
||||||
|
if ( !backend )
|
||||||
|
{
|
||||||
|
cWarning() << "No KPM backend found.";
|
||||||
|
return {};
|
||||||
|
}
|
||||||
#if defined( WITH_KPMCORE4API )
|
#if defined( WITH_KPMCORE4API )
|
||||||
DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag( 0 ) );
|
DeviceList devices = backend->scanDevices( /* not includeReadOnly, not includeLoopback */ ScanFlag( 0 ) );
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue