aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--types/output/cursor.c4
-rw-r--r--types/wlr_cursor.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/types/output/cursor.c b/types/output/cursor.c
index c2510896..4d0cc19a 100644
--- a/types/output/cursor.c
+++ b/types/output/cursor.c
@@ -394,9 +394,7 @@ static bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor) {
bool wlr_output_cursor_set_buffer(struct wlr_output_cursor *cursor,
struct wlr_buffer *buffer, int32_t hotspot_x, int32_t hotspot_y) {
struct wlr_renderer *renderer = cursor->output->renderer;
- if (!renderer) {
- return false;
- }
+ assert(renderer != NULL);
struct wlr_texture *texture = NULL;
struct wlr_fbox src_box = {0};
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index aca43bee..e1fabe5d 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -509,9 +509,7 @@ static void cursor_output_cursor_update(struct wlr_cursor_output_cursor *output_
if (cur->state->buffer != NULL) {
struct wlr_renderer *renderer = output_cursor->output_cursor->output->renderer;
- if (!renderer) {
- return;
- }
+ assert(renderer != NULL);
struct wlr_buffer *buffer = cur->state->buffer;
int32_t hotspot_x = cur->state->buffer_hotspot.x;