diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2013-11-20 17:33:59 +0000 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-03-09 13:41:37 +0000 |
commit | 4fc6880d8308b5ff69b72c23920fed75cf3f2661 (patch) | |
tree | 446035b5c7a19415ca6b5b8a91633e977c5ea5d9 | |
parent | 51971d56bc77644d380a1d7b175faaa807e59318 (diff) | |
download | gtk+-4fc6880d8308b5ff69b72c23920fed75cf3f2661.tar.gz |
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
-rw-r--r-- | gtk/gtktextview.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index a61dd1ed5e..13bade8b85 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -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; |