aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-pilot-map.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 3d978fc061..9e369dbdda 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-27 <jpr@helixcode.com>
+
+ * e-pilot-map.c (e_pilot_map_lookup_uid): Return null if no
+ pnode was found.
+
2000-10-27 JP Rosevear <jpr@helixcode.com>
* e-pilot-map.c (map_sax_start_element): Get archive field while
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
index 583e0ad2ec..4f985ccace 100644
--- a/e-util/e-pilot-map.c
+++ b/e-util/e-pilot-map.c
@@ -165,7 +165,7 @@ e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archi
guint32
e_pilot_map_lookup_pid (EPilotMap *map, const char *uid)
{
- EPilotMapUidNode *unode;
+ EPilotMapUidNode *unode = NULL;
unode = g_hash_table_lookup (map->uid_map, uid);
@@ -178,10 +178,13 @@ e_pilot_map_lookup_pid (EPilotMap *map, const char *uid)
const char *
e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid)
{
- EPilotMapPidNode *pnode;
+ EPilotMapPidNode *pnode = NULL;
pnode = g_hash_table_lookup (map->pid_map, &pid);
+ if (pnode == NULL)
+ return NULL;
+
return pnode->uid;
}