aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/vendor.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/vendor.c')
-rw-r--r--hardinfo2/vendor.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hardinfo2/vendor.c b/hardinfo2/vendor.c
index f75e4e38..3cc7bf39 100644
--- a/hardinfo2/vendor.c
+++ b/hardinfo2/vendor.c
@@ -81,6 +81,10 @@ static const Vendor vendors[] = {
const gchar *vendor_get_name(const gchar * id)
{
int i;
+
+ if (!id) {
+ return NULL;
+ }
for (i = 0; vendors[i].id; i++) {
if (strstr(id, vendors[i].id))
@@ -94,6 +98,10 @@ const gchar *vendor_get_url(const gchar * id)
{
int i;
+ if (!id) {
+ return NULL;
+ }
+
for (i = 0; vendors[i].id; i++) {
if (strstr(id, vendors[i].id))
return vendors[i].url;