Avoid an infinite loop by looking up the background image a different way.
The infinite loop happened because getcairo(BACKGROUNDIMAGE) was being called by the code that creates the background image, and they'd go back and forth. But really, the code that creates a background image just wanted to know if one already existed to copy from.
Fixes #6058
This code is set to be replaced soon by Martin, but it seems worth it to do a hotfix to avoid the crash in the meantime. With this change, the Filter Gallery works for me.
Edited by Michael Terry









