diff options
author | James Cloos <cloos@jhcloos.com> | 2008-05-12 03:03:13 -0400 |
---|---|---|
committer | James Cloos <cloos@jhcloos.com> | 2008-05-12 03:03:13 -0400 |
commit | 04211c3532ca078420e3745a5eac3d9de120bc32 (patch) | |
tree | 7842ac173622b1d5f2269b4a441be579dcfb160a /composite | |
parent | 7e768c08f7809b8dba4db1931e63314e2b6e1cfa (diff) |
Prevent the -wm command line option from causing a SEGV
The -wm (when mapped) option for the BackingStore support has been
causing the server to dereference a NULL pointer.
This has probably been the case since backing store has been
implemented on top of Composite.
It looks like (some of?) Composite didn’t expect its WIndowPtr
argument to be the root window.
In Composite’s compCheckRedirect() function we now avoid calling
compAllocPixmap() and compFreePixmap() when the pWin pointer’s
parent member is NULL, as is it the case with a server’s root window.
This addresses:
https://bugs.freedesktop.org/show_bug.cgi?id=15878
Diffstat (limited to 'composite')
-rw-r--r-- | composite/compwindow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/composite/compwindow.c b/composite/compwindow.c index 9c999173c..c1657bdcd 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -146,7 +146,7 @@ compCheckRedirect (WindowPtr pWin) Bool should; should = pWin->realized && (pWin->drawable.class != InputOnly) && - (cw != NULL); + (cw != NULL) && (pWin->parent != NULL); /* Never redirect the overlay window */ if (cs->pOverlayWin != NULL) { |