[gtk+/extended-layout-jhs: 12/64] Prevent undefined behaviour when gtk_widget_translate_coordinates fails.
- From: Johannes Schmid <jhs src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/extended-layout-jhs: 12/64] Prevent undefined behaviour when gtk_widget_translate_coordinates fails.
- Date: Wed, 25 Nov 2009 11:19:55 +0000 (UTC)
commit 203792797b55d1288968ee5aac2461a66bbe8261
Author: Mathias Hasselmann <mathias hasselmann gmx de>
Date: Wed Jun 27 23:43:47 2007 +0000
Prevent undefined behaviour when gtk_widget_translate_coordinates fails.
2007-06-28 Mathias Hasselmann <mathias hasselmann gmx de>
* gtk/gtkbin.c: Prevent undefined behaviour when
gtk_widget_translate_coordinates fails.
svn path=/branches/extended-layout/; revision=18266
ChangeLog.gtk-extended-layout | 5 +++++
gtk/gtkbin.c | 7 +++----
2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog.gtk-extended-layout b/ChangeLog.gtk-extended-layout
index 18148f8..a098d7f 100644
--- a/ChangeLog.gtk-extended-layout
+++ b/ChangeLog.gtk-extended-layout
@@ -1,3 +1,8 @@
+2007-06-28 Mathias Hasselmann <mathias hasselmann gmx de>
+
+ * gtk/gtkbin.c: Prevent undefined behaviour when
+ gtk_widget_translate_coordinates fails.
+
2007-06-20 Mathias Hasselmann <mathias hasselmann gmx de>
* tests/testextendedlayout.c: Provide checkboxes
diff --git a/gtk/gtkbin.c b/gtk/gtkbin.c
index d4b6e77..4ccc83f 100644
--- a/gtk/gtkbin.c
+++ b/gtk/gtkbin.c
@@ -215,11 +215,10 @@ gtk_bin_extended_layout_get_baselines (GtkExtendedLayout *layout,
layout = GTK_EXTENDED_LAYOUT (bin->child);
num_lines = gtk_extended_layout_get_baselines (layout, baselines);
- if (baselines)
- {
+ if (baselines &&
gtk_widget_translate_coordinates (bin->child, GTK_WIDGET (bin),
- 0, 0, NULL, &dy);
-
+ 0, 0, NULL, &dy))
+ {
baseptr = *baselines;
baseend = baseptr + num_lines;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]