summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/application.cpp b/src/application.cpp
index f55174d0..19f5b756 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -462,7 +462,9 @@ bool Application::eventFilter(QObject* watched, QEvent* event)
TabWindow *window = qobject_cast<TabWindow*>(watched);
if (window)
{
- if (m_tabWindows.at(0).data() != window)
+ if (!m_tabWindows.isEmpty()
+ && m_tabWindows.at(0)
+ && m_tabWindows.at(0).data() != window)
{
int index = m_tabWindows.indexOf(QWeakPointer<TabWindow>(window));
Q_ASSERT(index != -1);