From 15893c2a54d2101b02533113c7b137170bea5810 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Mon, 15 Dec 2008 00:15:12 -0500 Subject: opkg: protect against NULL src git-svn-id: http://opkg.googlecode.com/svn/trunk@100 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- 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); -- cgit v0.9.1