compositor: don't crash if destroying a compositor without a backend
Calling weston_compositor_destroy() on a pointer returned by weston_compositor_create() should be always valid, even if the compositor does not have yet a backend. Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
7e17fec68d
commit
2d24e64776
@ -4767,7 +4767,8 @@ weston_compositor_destroy(struct weston_compositor *compositor)
|
||||
|
||||
weston_compositor_xkb_destroy(compositor);
|
||||
|
||||
compositor->backend->destroy(compositor);
|
||||
if (compositor->backend)
|
||||
compositor->backend->destroy(compositor);
|
||||
free(compositor);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user