term: xcursor_update_for_seat(): BUG on xcursor == NULL

This commit is contained in:
Daniel Eklöf 2021-11-30 22:25:32 +01:00
parent fce13c4106
commit b3029234af
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -2962,7 +2962,7 @@ term_mouse_motion(struct terminal *term, int button, int row, int col,
void
term_xcursor_update_for_seat(struct terminal *term, struct seat *seat)
{
const char *xcursor;
const char *xcursor = NULL;
switch (term->active_surface) {
case TERM_SURF_GRID: {
@ -2996,6 +2996,9 @@ term_xcursor_update_for_seat(struct terminal *term, struct seat *seat)
return;
}
if (xcursor == NULL)
BUG("xcursor not set");
render_xcursor_set(seat, term, xcursor);
}