summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:15:12 (EST)
committer ticktock35 <ticktock35@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2008-12-15 00:15:12 (EST)
commit15893c2a54d2101b02533113c7b137170bea5810 (patch)
tree9b26802f799ab197eb96ba419a15b2e16593490c /libopkg
parentf53b702fecb08d1b8ee090bc48c12faeb5d4b49c (diff)
opkg: protect against NULL src
git-svn-id: http://opkg.googlecode.com/svn/trunk@100 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopkg/opkg.c b/libopkg/opkg.c
index 9f63812..4320ab9 100644
--- a/libopkg/opkg.c
+++ b/libopkg/opkg.c
@@ -61,7 +61,8 @@ old_pkg_to_new (pkg_t *old)
new->name = sstrdup (old->name);
new->version = pkg_version_str_alloc (old);
new->architecture = sstrdup (old->architecture);
- new->repository = sstrdup (old->src->name);
+ if (old->src)
+ new->repository = sstrdup (old->src->name);
new->description = sstrdup (old->description);
new->tags = sstrdup (old->tags);
new->url = sstrdup (old->url);