--- rxvt-unicode/src/rxvtperl.xs 2012/06/07 17:21:56 1.184 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/07 17:30:33 1.185 @@ -2100,6 +2100,12 @@ { img = img->clone (); // own the img + { + rxvt_img *img2 = img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); + delete img; + img = img2; + } + if (img->repeat != RepeatNormal) // X11 only supports RepeatNormal as bg pixmap { rxvt_img *img2 = img->sub_rect (0, 0, @@ -2110,12 +2116,6 @@ } { - rxvt_img *img2 = img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); - delete img; - img = img2; - } - - { // just in case, should usually be a nop rxvt_img *img2 = img->reify (); delete img;