mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fix a rare crash.
This commit is contained in:
parent
1af76cb2a9
commit
ac48237eca
@ -93,7 +93,6 @@ MainApplication::MainApplication(int &argc, char** argv)
|
|||||||
, m_desktopNotifications(0)
|
, m_desktopNotifications(0)
|
||||||
, m_webProfile(0)
|
, m_webProfile(0)
|
||||||
, m_autoSaver(0)
|
, m_autoSaver(0)
|
||||||
, m_lastActiveWindow(0)
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
|
||||||
, m_registerQAppAssociation(0)
|
, m_registerQAppAssociation(0)
|
||||||
#endif
|
#endif
|
||||||
@ -370,7 +369,7 @@ QList<BrowserWindow*> MainApplication::windows() const
|
|||||||
BrowserWindow* MainApplication::getWindow() const
|
BrowserWindow* MainApplication::getWindow() const
|
||||||
{
|
{
|
||||||
if (m_lastActiveWindow) {
|
if (m_lastActiveWindow) {
|
||||||
return m_lastActiveWindow;
|
return m_lastActiveWindow.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_windows.isEmpty() ? 0 : m_windows.first();
|
return m_windows.isEmpty() ? 0 : m_windows.first();
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#define mApp MainApplication::instance()
|
#define mApp MainApplication::instance()
|
||||||
|
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <QPointer>
|
||||||
|
|
||||||
#include "qtsingleapplication/qtsingleapplication.h"
|
#include "qtsingleapplication/qtsingleapplication.h"
|
||||||
#include "restoremanager.h"
|
#include "restoremanager.h"
|
||||||
@ -173,7 +174,7 @@ private:
|
|||||||
AutoSaver* m_autoSaver;
|
AutoSaver* m_autoSaver;
|
||||||
|
|
||||||
QList<BrowserWindow*> m_windows;
|
QList<BrowserWindow*> m_windows;
|
||||||
BrowserWindow* m_lastActiveWindow;
|
QPointer<BrowserWindow> m_lastActiveWindow;
|
||||||
|
|
||||||
QList<PostLaunchAction> m_postLaunchActions;
|
QList<PostLaunchAction> m_postLaunchActions;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user