ghostscript/ghostscript-colord.patch

20 lines
673 B
Diff

diff -up ghostscript-9.02/cups/colord.c.colord ghostscript-9.02/cups/colord.c
--- ghostscript-9.02/cups/colord.c.colord 2011-04-12 11:09:49.852203837 +0100
+++ ghostscript-9.02/cups/colord.c 2011-04-12 11:11:11.226356829 +0100
@@ -316,9 +316,14 @@ char *
colord_get_profile_for_device_id (const char *device_id,
const char **qualifier_tuple)
{
- DBusConnection *con;
+ DBusConnection *con = NULL;
char *filename = NULL;
+ if (device_id == NULL) {
+ fprintf(stderr, "DEBUG: No colord device ID available\n");
+ goto out;
+ }
+
/* connect to system bus */
con = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
if (con == NULL) {