![U. Artie Eoff](/assets/img/avatar_default.png)
Various functions that operate on a weston_surface assume the surface has a shell_surface. That is, they unconditionally deref the get_shell_surface() result. Hence, if for some reason the call to get_shell_surface() returned NULL to those functions then a segmentation fault would occur and the program would crash. So, adding an assert(...) on the get_shell_surface() return value adds an extra sanity check and does not change this behavior. The assert also adds an extra benefit to the programmer by documenting that the function expects and requires the weston_surface to have a shell_surface and would be a program logic error, otherwise. The assert() also silences some static analyzers about the possible NULL deref. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
…
…
…
Weston Weston is the reference implementation of a Wayland compositor, and a useful compositor in its own right. Weston has various backends that lets it run on Linux kernel modesetting and evdev input as well as under X11. Weston ships with a few example clients, from simple clients that demonstrate certain aspects of the protocol to more complete clients and a simplistic toolkit. There is also a quite capable terminal emulator (weston-terminal) and an toy/example desktop shell. Finally, weston also provides integration with the Xorg server and can pull X clients into the Wayland desktop and act as a X window manager. Refer to http://wayland.freedesktop.org/building.html for buiding weston and its dependencies.
Description
Languages
C
98.1%
Meson
1.3%
GLSL
0.3%
Shell
0.2%