SAL_WARN_IF not available in older builds

f41
Caolán McNamara 13 years ago
parent 87c6375427
commit ee403bb1a9

@ -11,15 +11,13 @@ diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 112e066..1cd1bd0 100644 index 112e066..1cd1bd0 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx --- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3984,8 +3984,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ @@ -3984,8 +3984,12 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
g_slist_free (attr_list); g_slist_free (attr_list);
// Set the sal attributes on our text // Set the sal attributes on our text
- for (int i = start; i < end; i++) - for (int i = start; i < end; i++)
+ 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())) + if (i >= static_cast<int>(pThis->m_aInputFlags.size()))
+ continue; + continue;
pThis->m_aInputFlags[i] |= sal_attr; pThis->m_aInputFlags[i] |= sal_attr;

Loading…
Cancel
Save