From Irene Ruengeler: Fix a crash.

svn path=/trunk/; revision=41818
This commit is contained in:
Michael Tüxen 2012-03-28 11:54:42 +00:00
parent 3d81f3612b
commit 20fdcad8b5
1 changed files with 5 additions and 3 deletions

View File

@ -63,7 +63,7 @@
#define BOTTOM_BORDER 50
#define SUB_32(a, b) ((a)-(b))
#define POINT_SIZE 3
#define POINT_SIZE 1
static GtkWidget * sack_bt;
@ -296,7 +296,7 @@ draw_sack_graph(struct sctp_udata *u_data)
if (xvalue >= LEFT_BORDER+u_data->io->offset &&
xvalue <= u_data->io->surface_width-RIGHT_BORDER+u_data->io->offset &&
yvalue >= TOP_BORDER-u_data->io->offset-POINT_SIZE &&
yvalue <= u_data->io->surface_height-BOTTOM_BORDER-u_data->io->offset)
yvalue <= u_data->io->surface_height-BOTTOM_BORDER-u_data->io->offset) {
#if GTK_CHECK_VERSION(2,22,0)
cr = cairo_create (u_data->io->surface);
#else
@ -311,6 +311,7 @@ draw_sack_graph(struct sctp_udata *u_data)
2 * G_PI);
cairo_fill(cr);
cairo_destroy(cr);
}
}
}
}
@ -499,7 +500,7 @@ draw_nr_sack_graph(struct sctp_udata *u_data)
if (xvalue >= LEFT_BORDER+u_data->io->offset &&
xvalue <= u_data->io->surface_width-RIGHT_BORDER+u_data->io->offset &&
yvalue >= TOP_BORDER-u_data->io->offset-POINT_SIZE &&
yvalue <= u_data->io->surface_height-BOTTOM_BORDER-u_data->io->offset)
yvalue <= u_data->io->surface_height-BOTTOM_BORDER-u_data->io->offset) {
#if GTK_CHECK_VERSION(2,22,0)
cr = cairo_create (u_data->io->surface);
#else
@ -514,6 +515,7 @@ draw_nr_sack_graph(struct sctp_udata *u_data)
2 * G_PI);
cairo_fill(cr);
cairo_destroy(cr);
}
}
}
}