Message ID | 1455294689-29249-6-git-send-email-martin.peres@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Feb 12, 2016 at 06:31:27PM +0200, Martin Peres wrote: > Caught by Klockwork, but it was a false positive. However, better safe > than sorry. No. cursor->image can be NULL for old gen/kernels. -Chris
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 9215b23..78937c2 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -5573,8 +5573,9 @@ static struct sna_cursor *__sna_get_cursor(struct sna *sna, xf86CrtcPtr crtc) argb = get_cursor_argb(sna->cursor.ref); pitch = BitmapBytePad(width); + assert(cursor->image); image = cursor->image; - if (image == NULL || transformed) { + if (transformed) { image = sna->cursor.scratch; cursor->last_width = cursor->last_height = size; }
Caught by Klockwork, but it was a false positive. However, better safe than sorry. Signed-off-by: Martin Peres <martin.peres@linux.intel.com> --- src/sna/sna_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)