mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-11-16 19:47:55 +01:00
plane: add NULL check to liftoff_plane_destroy()
All other libliftoff destructors already check for NULL, except this one.
This commit is contained in:
parent
94eb185771
commit
314684fc64
1 changed files with 4 additions and 0 deletions
4
plane.c
4
plane.c
|
@ -148,6 +148,10 @@ liftoff_plane_destroy(struct liftoff_plane *plane)
|
|||
{
|
||||
size_t i;
|
||||
|
||||
if (plane == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (plane->layer != NULL) {
|
||||
plane->layer->plane = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue