X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=blob.c;h=737f198013bdb4ae0ade08768a602b3c74c4323c;hb=c4a57c05c9353a59db14dd57f8c911f175c63371;hp=ca39de0db5fc8fdb15009d0ed1c46ec14ca15087;hpb=becfb4be64a123630775b6517279ed20e4b498f8;p=paraslash.git diff --git a/blob.c b/blob.c index ca39de0d..737f1980 100644 --- a/blob.c +++ b/blob.c @@ -487,7 +487,8 @@ static int blob_get_name_by_id(struct osl_table *table, uint32_t id, struct osl_object obj = {.data = &id, .size = sizeof(id)}; int ret; - *name = NULL; + if (name) + *name = NULL; if (!id) return 1; ret = osl(osl_get_row(table, BLOBCOL_ID, &obj, &row)); @@ -498,7 +499,8 @@ static int blob_get_name_by_id(struct osl_table *table, uint32_t id, return ret; if (*(char *)obj.data == '\0') return -E_DUMMY_ROW; - *name = (char *)obj.data; + if (name) + *name = (char *)obj.data; return 1; }