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

@ -128,8 +128,11 @@ write_loader_info (const char *path, GdkPixbufFormat *info)
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);
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);
}