diff options
Diffstat (limited to 'sway/extensions.c')
-rw-r--r-- | sway/extensions.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/extensions.c b/sway/extensions.c index 96c7e60d..40702e28 100644 --- a/sway/extensions.c +++ b/sway/extensions.c | |||
@@ -23,6 +23,10 @@ static struct panel_config *find_or_create_panel_config(struct wl_resource *reso | |||
23 | } | 23 | } |
24 | sway_log(L_DEBUG, "Creating panel config for resource %p", resource); | 24 | sway_log(L_DEBUG, "Creating panel config for resource %p", resource); |
25 | struct panel_config *config = calloc(1, sizeof(struct panel_config)); | 25 | struct panel_config *config = calloc(1, sizeof(struct panel_config)); |
26 | if (!config) { | ||
27 | sway_log(L_ERROR, "Unable to create panel config"); | ||
28 | return NULL; | ||
29 | } | ||
26 | list_add(desktop_shell.panels, config); | 30 | list_add(desktop_shell.panels, config); |
27 | config->wl_resource = resource; | 31 | config->wl_resource = resource; |
28 | return config; | 32 | return config; |
@@ -81,6 +85,10 @@ static void set_background(struct wl_client *client, struct wl_resource *resourc | |||
81 | } | 85 | } |
82 | sway_log(L_DEBUG, "Setting surface %p as background for output %d", surface, (int)output); | 86 | sway_log(L_DEBUG, "Setting surface %p as background for output %d", surface, (int)output); |
83 | struct background_config *config = malloc(sizeof(struct background_config)); | 87 | struct background_config *config = malloc(sizeof(struct background_config)); |
88 | if (!config) { | ||
89 | sway_log(L_ERROR, "Unable to allocate background config"); | ||
90 | return; | ||
91 | } | ||
84 | config->client = client; | 92 | config->client = client; |
85 | config->output = output; | 93 | config->output = output; |
86 | config->surface = wlc_resource_from_wl_surface_resource(surface); | 94 | config->surface = wlc_resource_from_wl_surface_resource(surface); |