libfreerdp-cache/bitmap: add a pointer check to fix a segfault.