diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-05 21:02:45 +0000 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-06-04 18:46:03 +0200 |
commit | 10a390d4676cb678c58b2d6f1db9db8a76041996 (patch) | |
tree | aae59158dee03f2b66fc9b27b4cd2231ffb1df09 | |
parent | d366ae2031d13f3198cb58c715f18e8c8ce8686f (diff) |
fdo#50676: Related: rhbz#799628 crash with chewing-IM with g3g
(cherry picked from commit 7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714)
Change-Id: I30767fdf7eb6297d12f2b8fb76dab084bd160bed
Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index c5df600c6a19..ded316fb32d9 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -4035,8 +4035,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ g_slist_free (attr_list); // Set the sal attributes on our text - for (int i = start; i < end; i++) + for (int i = start; i < end; ++i) + { + SAL_WARN_IF(i >= static_cast<int>(pThis->m_aInputFlags.size()), + "vcl.gtk", "pango attrib out of range?"); + if (i >= static_cast<int>(pThis->m_aInputFlags.size())) + continue; pThis->m_aInputFlags[i] |= sal_attr; + } } while (pango_attr_iterator_next (iter)); pThis->m_aInputEvent.mpTextAttr = &pThis->m_aInputFlags[0]; |