Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simon Zeni
wlroots
Commits
66877e60
Commit
66877e60
authored
Nov 18, 2021
by
Simon Zeni
Browse files
types/wlr_output: validate swapchain creation before destroying the current one
parent
4a8e681a
Pipeline
#449222
failed with stage
in 2 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
types/output/cursor.c
View file @
66877e60
...
...
@@ -261,14 +261,15 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
return
NULL
;
}
wlr_swapchain_destroy
(
output
->
cursor_swapchain
);
output
->
cursor_swapchain
=
wlr_swapchain_create
(
allocator
,
struct
wlr_swapchain
*
swapchain
=
wlr_swapchain_create
(
allocator
,
width
,
height
,
format
);
free
(
format
);
if
(
output
->
cursor_
swapchain
==
NULL
)
{
if
(
swapchain
==
NULL
)
{
wlr_log
(
WLR_ERROR
,
"Failed to create cursor swapchain"
);
return
NULL
;
}
wlr_swapchain_destroy
(
output
->
cursor_swapchain
);
output
->
cursor_swapchain
=
swapchain
;
}
struct
wlr_buffer
*
buffer
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment