diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-05 21:02:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-06 11:26:33 +0000 |
commit | 7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714 (patch) | |
tree | efe65045a912fd524ddd668aea656b07ac61616b /vcl | |
parent | idle code documentation improvement (diff) | |
download | core-7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714.tar.gz core-7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714.zip |
Related: rhbz#799628 crash with chewing-IM with g3g
Diffstat (limited to 'vcl')
-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 112e066d8e76..1cd1bd0f53b4 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -3984,8 +3984,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]; |