Avoid a segfault if license is NULL

The license field was introduced later on, so some out-of-tree loaders
may not set it. And Solaris printf() doesn't take NULL for a string...
Bug 594178.
This commit is contained in:
Matthias Clasen 2009-09-04 18:22:30 -04:00
parent 1c0ecc0380
commit 079cc21956

View File

@ -119,17 +119,20 @@ loader_sanity_check (const char *path, GdkPixbufFormat *info, GdkPixbufModule *v
return 0;
}
static void
static void
write_loader_info (const char *path, GdkPixbufFormat *info)
{
const GdkPixbufModulePattern *pattern;
char **mime;
char **ext;
char **mime;
char **ext;
g_printf("\"%s\"\n", path);
g_printf ("\"%s\" %u \"%s\" \"%s\" \"%s\"\n",
info->name, info->flags,
info->domain ? info->domain : GETTEXT_PACKAGE, info->description, info->license);
g_printf ("\"%s\" %u \"%s\" \"%s\" \"%s\"\n",
info->name,
info->flags,
info->domain ? info->domain : GETTEXT_PACKAGE,
info->description,
info->license ? info->license : "");
for (mime = info->mime_types; *mime; mime++) {
g_printf ("\"%s\" ", *mime);
}