mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
backend/drm: fix crash in init_drm_surface
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3434
This commit is contained in:
parent
1cb6b2cf67
commit
2e69eb1030
1 changed files with 2 additions and 1 deletions
|
@ -61,7 +61,8 @@ static void finish_drm_surface(struct wlr_drm_surface *surf) {
|
||||||
bool init_drm_surface(struct wlr_drm_surface *surf,
|
bool init_drm_surface(struct wlr_drm_surface *surf,
|
||||||
struct wlr_drm_renderer *renderer, int width, int height,
|
struct wlr_drm_renderer *renderer, int width, int height,
|
||||||
const struct wlr_drm_format *drm_format) {
|
const struct wlr_drm_format *drm_format) {
|
||||||
if (surf->swapchain->width == width && surf->swapchain->height == height) {
|
if (surf->swapchain != NULL && surf->swapchain->width == width &&
|
||||||
|
surf->swapchain->height == height) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue