From cff17f303839a0280a35e10cf99ba144d52240ba Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Thu, 19 Sep 2013 12:27:03 -0700 Subject: [PATCH] xrdp: fix a crash in painter when invalid target is set --- xrdp/xrdp_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;