aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 5eb4be0f..3a311cd1 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -271,6 +271,9 @@ struct sway_container *workspace_by_name(const char *name) {
271 */ 271 */
272struct sway_container *workspace_output_prev_next_impl( 272struct sway_container *workspace_output_prev_next_impl(
273 struct sway_container *output, bool next) { 273 struct sway_container *output, bool next) {
274 if (!output) {
275 return NULL;
276 }
274 if (!sway_assert(output->type == C_OUTPUT, 277 if (!sway_assert(output->type == C_OUTPUT,
275 "Argument must be an output, is %d", output->type)) { 278 "Argument must be an output, is %d", output->type)) {
276 return NULL; 279 return NULL;
@@ -303,6 +306,9 @@ struct sway_container *workspace_output_prev_next_impl(
303 */ 306 */
304struct sway_container *workspace_prev_next_impl( 307struct sway_container *workspace_prev_next_impl(
305 struct sway_container *workspace, bool next) { 308 struct sway_container *workspace, bool next) {
309 if (!workspace) {
310 return NULL;
311 }
306 if (!sway_assert(workspace->type == C_WORKSPACE, 312 if (!sway_assert(workspace->type == C_WORKSPACE,
307 "Argument must be a workspace, is %d", workspace->type)) { 313 "Argument must be a workspace, is %d", workspace->type)) {
308 return NULL; 314 return NULL;