mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
Fix crash on quit if KDE wallet subsystem is disabled
REVIEW: 120097
This commit is contained in:
committed by
Albert Astals Cid
parent
0bff5df104
commit
b6b20c84e8
@@ -54,8 +54,10 @@ void InvitationsRfbServer::init()
|
||||
|
||||
instance->m_wallet = Wallet::openWallet(
|
||||
Wallet::NetworkWallet(), 0, Wallet::Asynchronous);
|
||||
connect(instance->m_wallet, SIGNAL(walletOpened(bool)),
|
||||
instance, SLOT(walletOpened(bool)));
|
||||
if(instance->m_wallet) {
|
||||
connect(instance->m_wallet, SIGNAL(walletOpened(bool)),
|
||||
instance, SLOT(walletOpened(bool)));
|
||||
}
|
||||
}
|
||||
|
||||
const QString& InvitationsRfbServer::desktopPassword() const
|
||||
@@ -121,7 +123,7 @@ InvitationsRfbServer::~InvitationsRfbServer()
|
||||
KSharedConfigPtr config = KGlobal::config();
|
||||
KConfigGroup krfbConfig(config,"Security");
|
||||
krfbConfig.writeEntry("allowUnattendedAccess",m_allowUnattendedAccess);
|
||||
if(m_wallet->isOpen()) {
|
||||
if(m_wallet && m_wallet->isOpen()) {
|
||||
|
||||
if( (m_wallet->currentFolder()=="krfb") ||
|
||||
((m_wallet->hasFolder("krfb") || m_wallet->createFolder("krfb")) &&
|
||||
@@ -150,6 +152,7 @@ void InvitationsRfbServer::walletOpened(bool opened)
|
||||
{
|
||||
QString desktopPassword;
|
||||
QString unattendedPassword;
|
||||
Q_ASSERT(m_wallet);
|
||||
if( opened &&
|
||||
( m_wallet->hasFolder("krfb") || m_wallet->createFolder("krfb") ) &&
|
||||
m_wallet->setFolder("krfb") ) {
|
||||
|
||||
Reference in New Issue
Block a user