Comment 35 for bug 905147

Revision history for this message
In , Kevin-kofler (kevin-kofler) wrote :

That patch as is causes https://bugzilla.redhat.com/show_bug.cgi?id=566304

The offending lines:
+ // set default color
+ if( cups->currentPPD()->color_device )
+ options.color->setChecked(true);
+ else
+ options.grayscale->setChecked(true);
and later:
+ // set default color
+ if( cups.currentPPD()->color_device )
+ setColorMode(Color);
+ else
+ setColorMode(GrayScale);

They should be changed to:
    if ( cups->currentPPD() )
      {
        // set default color
        if( cups->currentPPD()->color_device )
          options.color->setChecked(true);
        else
          options.grayscale->setChecked(true);
      }
and:
    if ( cups.currentPPD() )
      {
        // set default color
        if( cups.currentPPD()->color_device )
          setColorMode(Color);
        else
          setColorMode(GrayScale);
      }
(I matched the coding style of the surrounding code.)

I'm going to try changing this in the Fedora package and will attach a fixed patch if this works.