[gtk+] Fix for bug 672961 - Custom theme can crash apps with GtkEntryCompletion
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix for bug 672961 - Custom theme can crash apps with GtkEntryCompletion
- Date: Wed, 28 Mar 2012 00:30:29 +0000 (UTC)
commit 94dbefda1c5da3d8b8265593c686f5deee24e71c
Author: Benjamin Otte <otte redhat com>
Date: Tue Mar 27 20:29:56 2012 -0400
Fix for bug 672961 - Custom theme can crash apps with GtkEntryCompletion
gtk/gtkentrycompletion.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index bfaaa1c..8367ed9 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1513,7 +1513,9 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
monitor_num = gdk_screen_get_monitor_at_window (screen, window);
gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
- if (y > monitor.height / 2)
+ if (height == 0)
+ items = 0;
+ else if (y > monitor.height / 2)
items = MIN (matches, (((monitor.y + y) - (actions * action_height)) / height) - 1);
else
items = MIN (matches, (((monitor.height - y) - (actions * action_height)) / height) - 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]