[gtk+/gtk-3-16] Fix a cornercase crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-16] Fix a cornercase crash
- Date: Fri, 29 May 2015 04:16:25 +0000 (UTC)
commit bb0561f3561e45e39b81cbed1fdba6c48bf0b152
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 28 23:42:14 2015 -0400
Fix a cornercase crash
If gtk_text_layout_move_cursor_visually is called with a
count of 0, we were passing NULL to a free function that
can't handle it. Don't do that.
https://bugzilla.gnome.org/show_bug.cgi?id=750058
gtk/gtktextlayout.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index 00dbefa..763ef3b 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -3660,7 +3660,8 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
gtk_text_iter_backward_char (iter);
}
- gtk_text_layout_free_line_display (layout, display);
+ if (display)
+ gtk_text_layout_free_line_display (layout, display);
done:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]