console: avoid code duplication in cairo destruction code
We can use our destruction function to avoid code duplication. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
a422c9f370
commit
84f29458e5
@ -122,13 +122,7 @@ static int kmscon_console_new_res(struct kmscon_console *con)
|
||||
goto err_cairo;
|
||||
}
|
||||
|
||||
if (con->cr) {
|
||||
glDeleteTextures(1, &con->tex);
|
||||
con->tex = 0;
|
||||
cairo_destroy(con->cr);
|
||||
cairo_surface_destroy(con->surf);
|
||||
free(con->surf_buf);
|
||||
}
|
||||
kmscon_console_free_res(con);
|
||||
|
||||
con->surf_buf = buf;
|
||||
con->surf = surface;
|
||||
|
Loading…
x
Reference in New Issue
Block a user