From f9a18c9f38d09c145eb513ca989966dc135c1e9b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 13 Oct 2013 10:36:35 +0100 Subject: uxa: Check for allocation failure in i915 video For a large screen, we have to create a temporary surface for rendering the textured video. If this pixmap creation fails we may be left with a system memory only pixmap leading to a segfault. Reported-by: Bas Wijnen Signed-off-by: Chris Wilson --- src/uxa/i915_video.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/uxa') diff --git a/src/uxa/i915_video.c b/src/uxa/i915_video.c index f6a1c6e1..16389cdb 100644 --- a/src/uxa/i915_video.c +++ b/src/uxa/i915_video.c @@ -78,6 +78,11 @@ I915DisplayVideoTextured(ScrnInfoPtr scrn, if (target == NULL) return; + if (intel_get_pixmap_bo(target) == NULL) { + screen->DestroyPixmap(target); + return; + } + pix_xoff = -dxo; pix_yoff = -dyo; } else { -- cgit v1.2.3