a67f28e
From 7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714 Mon Sep 17 00:00:00 2001
a67f28e
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
a67f28e
Date: Mon, 5 Mar 2012 21:02:45 +0000
a67f28e
Subject: [PATCH] Related: rhbz#799628 crash with chewing-IM with g3g
a67f28e
a67f28e
---
a67f28e
 vcl/unx/gtk/window/gtkframe.cxx |    8 +++++++-
a67f28e
 1 files changed, 7 insertions(+), 1 deletions(-)
a67f28e
a67f28e
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
a67f28e
index 112e066..1cd1bd0 100644
a67f28e
--- a/vcl/unx/gtk/window/gtkframe.cxx
a67f28e
+++ b/vcl/unx/gtk/window/gtkframe.cxx
ee403bb
@@ -3984,8 +3984,12 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
a67f28e
         g_slist_free (attr_list);
a67f28e
 
a67f28e
         // Set the sal attributes on our text
a67f28e
-        for (int i = start; i < end; i++)
a67f28e
+        for (int i = start; i < end; ++i)
a67f28e
+        {
a67f28e
+            if (i >= static_cast<int>(pThis->m_aInputFlags.size()))
a67f28e
+                continue;
a67f28e
             pThis->m_aInputFlags[i] |= sal_attr;
a67f28e
+        }
a67f28e
     } while (pango_attr_iterator_next (iter));
a67f28e
 
a67f28e
     pThis->m_aInputEvent.mpTextAttr         = &pThis->m_aInputFlags[0];
a67f28e
-- 
a67f28e
1.7.7.6
a67f28e