diff --git a/src/app/qtlocalpeer/qtlockedfile.cpp b/src/app/qtlocalpeer/qtlockedfile.cpp index 9b6b2acb1..f3041c56c 100644 --- a/src/app/qtlocalpeer/qtlockedfile.cpp +++ b/src/app/qtlocalpeer/qtlockedfile.cpp @@ -111,10 +111,6 @@ QtLockedFile::QtLockedFile() : QFile() { -#ifdef Q_OS_WIN - wmutex = 0; - rmutex = 0; -#endif m_lock_mode = NoLock; } @@ -128,10 +124,6 @@ QtLockedFile::QtLockedFile() QtLockedFile::QtLockedFile(const QString &name) : QFile(name) { -#ifdef Q_OS_WIN - wmutex = 0; - rmutex = 0; -#endif m_lock_mode = NoLock; } diff --git a/src/app/qtlocalpeer/qtlockedfile.h b/src/app/qtlocalpeer/qtlockedfile.h index e97b4c761..ee89062d9 100644 --- a/src/app/qtlocalpeer/qtlockedfile.h +++ b/src/app/qtlocalpeer/qtlockedfile.h @@ -103,8 +103,8 @@ namespace QtLP_Private Qt::HANDLE getMutexHandle(int idx, bool doCreate); bool waitMutex(Qt::HANDLE mutex, bool doBlock); - Qt::HANDLE wmutex; - Qt::HANDLE rmutex; + Qt::HANDLE wmutex = nullptr; + Qt::HANDLE rmutex = nullptr; QVector rmutexes; QString mutexname; #endif diff --git a/src/base/bittorrent/customstorage.cpp b/src/base/bittorrent/customstorage.cpp index fd3f63bd7..864707821 100644 --- a/src/base/bittorrent/customstorage.cpp +++ b/src/base/bittorrent/customstorage.cpp @@ -42,8 +42,8 @@ lt::storage_interface *customStorageConstructor(const lt::storage_params ¶ms CustomStorage::CustomStorage(const lt::storage_params ¶ms, lt::file_pool &filePool) : lt::default_storage {params, filePool} + , m_savePath {Utils::Fs::expandPathAbs(QString::fromStdString(params.path))} { - m_savePath = Utils::Fs::expandPathAbs(QString::fromStdString(params.path)); } bool CustomStorage::verify_resume_data(const lt::add_torrent_params &rd, const lt::aux::vector &links, lt::storage_error &ec)