summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-12-01 23:46:54 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-12-01 23:46:54 +1100
commit223adfae7caab8603c22159db00af7c08da9023c (patch)
treefd1db64bd93de378c712c6c455b5b1e77050fe84
parente65dea139ee4917bb87f51254164317952717586 (diff)
Fix crash in twin_composite if msk == NULL
Oops, introduced by the transform changes, I wasn't testing msk for NULL before dereferencing it in one spot. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--twin_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/twin_draw.c b/twin_draw.c
index 7c2b699..3045cea 100644
--- a/twin_draw.c
+++ b/twin_draw.c
@@ -618,8 +618,8 @@ void twin_composite (twin_pixmap_t *dst,
{
if ((src->source_kind == TWIN_PIXMAP &&
!twin_matrix_is_identity(&src->u.pixmap->transform)) ||
- (msk->source_kind == TWIN_PIXMAP &&
- !twin_matrix_is_identity(&msk->u.pixmap->transform)))
+ (msk && (msk->source_kind == TWIN_PIXMAP &&
+ !twin_matrix_is_identity(&msk->u.pixmap->transform))))
_twin_composite_xform(dst, dst_x, dst_y,
src, src_x, src_y,
msk, msk_x, msk_y,