From 50dd943e7d8ecde43426d0a8fbd4a4f6efea349b Mon Sep 17 00:00:00 2001 From: Antonis Tsiapaliokas Date: Tue, 10 Sep 2013 13:34:55 +0300 Subject: [PATCH] Check if the m_effectsList is valid before we try to access it --- kcmkwin/kwincompositing/model.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp index 243488ac2e..4814d928d7 100644 --- a/kcmkwin/kwincompositing/model.cpp +++ b/kcmkwin/kwincompositing/model.cpp @@ -210,7 +210,8 @@ void EffectModel::handleDesktopSwitching(int row) void EffectModel::handleWindowManagement(int row, bool enabled) { - m_effectsList[row].effectStatus = enabled; + if (m_effectsList.size() > 0) + m_effectsList[row].effectStatus = enabled; } int EffectModel::findRowByServiceName(const QString &serviceName)