[sftp] Fix crash after mount timed out
When the mount failed after timing out we destroy the mounter If then the packet actually arrives we access a null mounter Ignore packets in that state SENTRY: KDECONNECT-KDE-4A
This commit is contained in:
parent
05963bae29
commit
2e5b1e188f
1 changed files with 6 additions and 0 deletions
|
@ -120,6 +120,12 @@ void SftpPlugin::receivePacket(const NetworkPacket &np)
|
|||
return;
|
||||
}
|
||||
|
||||
// if a packet arrives before mounting or after the mount timed out, ignore it
|
||||
if (!m_mounter) {
|
||||
qCDebug(KDECONNECT_PLUGIN_SFTP) << "Received network packet but no mount is active, ignoring";
|
||||
return;
|
||||
}
|
||||
|
||||
m_mounter->onPacketReceived(np);
|
||||
|
||||
remoteDirectories.clear();
|
||||
|
|
Loading…
Reference in a new issue