fixed: Crash in GUIPicturesWindow caused by PR2890 (fixes #14500)

This should fix #14500, haven't tried to reproduce it myself but the problem seems pretty obvious.