Skip to content

Commit

Permalink
cover the case of servers asking for cached bitmaps they have never d…
Browse files Browse the repository at this point in the history
…efined
  • Loading branch information
dpoe committed Jul 25, 2013
1 parent cd68f79 commit 46a691d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libfreerdp/cache/bitmap.c
Expand Up @@ -40,6 +40,8 @@ void update_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt)
bitmap = offscreen_cache_get(cache->offscreen, memblt->cacheIndex);
else
bitmap = bitmap_cache_get(cache->bitmap, (BYTE) memblt->cacheId, memblt->cacheIndex);
/* XP-SP2 servers sometimes ask for cached bitmaps they've never defined. */
if (bitmap == NULL) return;

memblt->bitmap = bitmap;
IFCALL(cache->bitmap->MemBlt, context, memblt);
Expand All @@ -56,6 +58,8 @@ void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex);
else
bitmap = bitmap_cache_get(cache->bitmap, (BYTE) mem3blt->cacheId, mem3blt->cacheIndex);
/* XP-SP2 servers sometimes ask for cached bitmaps they've never defined. */
if (bitmap == NULL) return;

style = brush->style;

Expand Down

0 comments on commit 46a691d

Please sign in to comment.