2011-05-05 11:26:40 +00:00
|
|
|
diff -up gutenprint-5.2.7/src/escputil/escputil.c.null-pointer gutenprint-5.2.7/src/escputil/escputil.c
|
|
|
|
--- gutenprint-5.2.7/src/escputil/escputil.c.null-pointer 2010-12-11 23:04:07.000000000 +0100
|
2011-07-25 16:04:48 +00:00
|
|
|
+++ gutenprint-5.2.7/src/escputil/escputil.c 2011-07-25 17:52:56.999202508 +0200
|
|
|
|
@@ -1340,10 +1340,14 @@ do_new_status(status_cmd_t cmd, char *bu
|
2010-12-02 17:59:37 +00:00
|
|
|
const char *ind;
|
|
|
|
const stp_string_list_t *color_list = NULL;
|
|
|
|
stp_parameter_t desc;
|
|
|
|
- const stp_vars_t *printvars = stp_printer_get_defaults(printer);
|
|
|
|
- stp_describe_parameter(printvars, "ChannelNames", &desc);
|
|
|
|
- if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST)
|
|
|
|
- color_list = desc.bounds.str;
|
|
|
|
+ const stp_vars_t *printvars = NULL;
|
2011-07-25 16:04:48 +00:00
|
|
|
+ if (printer)
|
|
|
|
+ {
|
|
|
|
+ printvars = stp_printer_get_defaults(printer);
|
|
|
|
+ stp_describe_parameter(printvars, "ChannelNames", &desc);
|
|
|
|
+ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST)
|
|
|
|
+ color_list = desc.bounds.str;
|
|
|
|
+ }
|
2011-05-05 11:26:40 +00:00
|
|
|
STP_DEBUG(printf("New format bytes: %d bytes\n", bytes));
|
2010-12-02 17:59:37 +00:00
|
|
|
if (cmd == CMD_STATUS)
|
|
|
|
printf(_("Printer Name: %s\n"),
|
2011-07-25 16:04:48 +00:00
|
|
|
@@ -1428,7 +1432,8 @@ do_new_status(status_cmd_t cmd, char *bu
|
|
|
|
}
|
|
|
|
i += total_param_count + 2;
|
|
|
|
}
|
|
|
|
- stp_parameter_description_destroy(&desc);
|
|
|
|
+ if (printer)
|
|
|
|
+ stp_parameter_description_destroy(&desc);
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|