gtktextview: Fix a definite use of an uninitialised variable

This seems to have been a typo in the original code, and allowed access
to virtual_cursor_y when it was uninitialised.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
This commit is contained in:
Philip Withnall 2013-11-20 17:33:59 +00:00
parent 51971d56bc
commit 4fc6880d83

View File

@ -8787,7 +8787,7 @@ gtk_text_view_get_virtual_cursor_pos (GtkTextView *text_view,
if (y)
{
if (priv->virtual_cursor_x != -1)
if (priv->virtual_cursor_y != -1)
*y = priv->virtual_cursor_y;
else
*y = pos.y + pos.height / 2;