summaryrefslogtreecommitdiff
path: root/graphics/pornview/patches/patch-ac
blob: 93a426a0531a1d1174f1948cd70511482ae28c31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$NetBSD: patch-ac,v 1.1.1.1 2006/02/11 13:06:43 rillig Exp $

--- src/support/widgets/zlist.c.orig	2002-12-13 10:52:56.000000000 +0000
+++ src/support/widgets/zlist.c
@@ -634,7 +634,8 @@ zlist_draw (GtkWidget * widget, GdkRecta
 					   CELL_X_FROM_COL (list, j), area->y,
 					   list->cell_x_pad, area->height);
 
-		cell = ZLIST_CELL_FROM_INDEX (list, idx);
+		if (idx < list->cell_count)
+		    cell = ZLIST_CELL_FROM_INDEX (list, idx);
 
 		cell_area.x = CELL_X_FROM_COL (list, j) + list->cell_x_pad;
 		cell_area.y = CELL_Y_FROM_ROW (list, i) + list->cell_y_pad;