SVN commit 827558 by edulix:
Fixing bug 165114. The problem was that when autosave was disabled, the destructor tried to access to already free'd memory: m_autoSavedSessionConfig->name().
BUG: 165114
CCMAIL:
kfm-devel@...
M +7 -5 konqsessionmanager.cpp
--- trunk/KDE/kdebase/apps/konqueror/src/konqsessionmanager.cpp #827557:827558
@@ -79,15 +79,14 @@
KonqSessionManager::~KonqSessionManager()
{
- // Session correctly closed
- QString file = KStandardDirs::locateLocal("appdata", m_autoSavedSessionConfig->name());
- QFile::remove(file);
-
- delete m_autoSavedSessionConfig;
+ disableAutosave();
}
void KonqSessionManager::disableAutosave()
{
+ if(!m_autosaveEnabled)
+ return;
+
m_autosaveEnabled = false;
m_autoSaveTimer.stop();
QString file = KStandardDirs::locateLocal("appdata", m_autoSavedSessionConfig->name());
@@ -97,6 +96,9 @@
void KonqSessionManager::enableAutosave()
{
+ if(m_autosaveEnabled)
+ return;
+
// Create the config file for autosaving current session
QString filename = "autosave/" +
encodeFilename(QDBusConnection::sessionBus().baseService());