forked from mirrors/gio-qt
fix: calling DGioVolume::getMount() on an unmounted volume results in a crash.
This commit is contained in:
parent
939b030551
commit
6dee1e99c3
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ QExplicitlySharedDataPointer<DGioMount> DGioVolume::getMount()
|
|||
Q_D(DGioVolume);
|
||||
|
||||
Glib::RefPtr<Mount> mnt = d->getGmmVolumeInstance()->get_mount();
|
||||
QExplicitlySharedDataPointer<DGioMount> mntPtr(new DGioMount(mnt.release()));
|
||||
QExplicitlySharedDataPointer<DGioMount> mntPtr(mnt ? new DGioMount(mnt.release()) : nullptr);
|
||||
|
||||
return mntPtr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue