diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 10bea994..51a2de85 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -2439,7 +2439,7 @@ server_switch_os_surface(struct xrdp_mod *mod, int rdpindex) bi = xrdp_cache_get_os_bitmap(wm->cache, rdpindex); - if (bi != 0) + if ((bi != 0) && (bi->bitmap != 0)) { //g_writeln("server_switch_os_surface: setting target_surface to rdpid %d", id); wm->target_surface = bi->bitmap;