From 06a7a1ac477dded1bc7d1ec165980dfd12ab4526 Mon Sep 17 00:00:00 2001
From: Alexander Smorkalov <alexander.smorkalov@itseez.com>
Date: Mon, 16 Sep 2013 13:42:15 +0400
Subject: [PATCH] Bug #1890 Opencv 2.4.0 with QT 4.7.4 and cvcreatebutton
 exception fixed.

QVector range check exception fixed.
---
 modules/highgui/src/window_QT.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp
index eb9cfe37d..84af3941a 100644
--- a/modules/highgui/src/window_QT.cpp
+++ b/modules/highgui/src/window_QT.cpp
@@ -1736,7 +1736,8 @@ void CvWindow::displayStatusBar(QString text, int delayms)
 
 void CvWindow::enablePropertiesButton()
 {
-    vect_QActions[9]->setDisabled(false);
+    if (!vect_QActions.empty())
+        vect_QActions[9]->setDisabled(false);
 }