aboutsummaryrefslogtreecommitdiffstats
path: root/epan/range.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-01-20 23:33:38 +0000
committerGerald Combs <gerald@wireshark.org>2009-01-20 23:33:38 +0000
commit5ff80e9b5fd3f68a1ab11e2d04c40f6b99eab205 (patch)
tree65c68e7ce6a86019d6573e318a64517dbf060031 /epan/range.c
parentb82ef98f4b592432ed81342696caafcc099c91e1 (diff)
Use the correct data type for the range string in the Win32 file dialog.
Have value_is_in_range() to gracefully handle a NULL range. This might fix bug 3208. svn path=/trunk/; revision=27281
Diffstat (limited to 'epan/range.c')
-rw-r--r--epan/range.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/range.c b/epan/range.c
index 16059f6ce5..96745f3cb1 100644
--- a/epan/range.c
+++ b/epan/range.c
@@ -245,9 +245,11 @@ gboolean value_is_in_range(range_t *range, guint32 val)
{
guint i;
- for (i=0; i < range->nranges; i++) {
- if (val >= range->ranges[i].low && val <= range->ranges[i].high)
- return TRUE;
+ if (range) {
+ for (i=0; i < range->nranges; i++) {
+ if (val >= range->ranges[i].low && val <= range->ranges[i].high)
+ return TRUE;
+ }
}
return(FALSE);
}