Don't try to paint onto an error surface. This happens for example when gdk_cairo_set_source_pixbuf() is called with a pixbuf that is too big for Cairo to handle. Spotted by Christian Boxdörfer