Create a new d-pointer when copying Device class.

Fixes a crash in Calamares
This commit is contained in:
Andrius Štikonas 2018-04-09 02:45:24 +01:00
parent 7e8bab3b4e
commit 1021e375b4
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ Device::Device(std::shared_ptr<DevicePrivate> d_ptr,
Device::Device(const Device& other)
: QObject()
{
d = std::make_shared<DevicePrivate>();
d->m_Name = other.d->m_Name;
d->m_DeviceNode = other.d->m_DeviceNode;
d->m_LogicalSectorSize = other.d->m_LogicalSectorSize;