mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
Sanity check to avoid dereferencing a null pointer.
* src/compositor.c (do_effect): Sanity check to avoid dereferencing a null pointer.
This commit is contained in:
parent
54b0105ffa
commit
ea137d35f3
@ -1,3 +1,8 @@
|
||||
2006-12-12 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* src/compositor.c (do_effect): Sanity check to avoid dereferencing
|
||||
a null pointer.
|
||||
|
||||
2006-12-10 Thomas Thurman <thomas@thurman.org.uk>
|
||||
|
||||
* configure.in: post-release bump to 2.17.5.
|
||||
|
@ -121,6 +121,15 @@ do_effect (MetaEffect *effect,
|
||||
MetaCompWindow *window;
|
||||
|
||||
screen = meta_comp_screen_get_by_xwindow (get_xid (effect->window));
|
||||
|
||||
if (!screen)
|
||||
{
|
||||
/* sanity check: if no screen is found, bail */
|
||||
meta_warning ("No screen found for %s (%ld); aborting effect.\n",
|
||||
effect->window->desc, get_xid (effect->window));
|
||||
return;
|
||||
}
|
||||
|
||||
window = meta_comp_screen_lookup_window (screen, get_xid (effect->window));
|
||||
|
||||
switch (effect->type)
|
||||
|
Loading…
Reference in New Issue
Block a user