Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > afbaa01160450b394f77475e0b41aa3f > files > 7

gutenprint-5.2.7-1.fc13.src.rpm

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
+++ gutenprint-5.2.7/src/escputil/escputil.c	2011-05-05 13:11:37.000000000 +0200
@@ -1340,10 +1340,8 @@ do_new_status(status_cmd_t cmd, char *bu
   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;
+
   STP_DEBUG(printf("New format bytes: %d bytes\n", bytes));
   if (cmd == CMD_STATUS)
     printf(_("Printer Name: %s\n"),
@@ -1409,6 +1407,13 @@ do_new_status(status_cmd_t cmd, char *bu
 	      for (j = 0; j < total_param_count; j++)
 		{
 		  param = (unsigned) buf[i + j + 2];
+		  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;
+		  }
 		  print_warning(param, color_list);
 		}
 	      break;