diff options
| author | Drew DeVault <[email protected]> | 2019-02-21 09:14:19 -0500 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2019-02-21 09:14:19 -0500 | 
| commit | 79c133182d85342748b284e20e1e634821ce419c (patch) | |
| tree | 690007114db3d7e4bfcfeb0c1637d06c82993c08 /sway/desktop | |
| parent | 546b976baa9989676c2fb2aff8c36f42b3d19810 (diff) | |
| parent | 03dfdb1edbfc445fe30b6456827ae93ef6c18426 (diff) | |
Merge pull request #3743 from RedSoxFan/fix-output-get-active-workspace
output_get_active_workspace: check workspaces length
Diffstat (limited to 'sway/desktop')
| -rw-r--r-- | sway/desktop/output.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index c5461ee6..61beb7af 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -320,6 +320,9 @@ struct sway_workspace *output_get_active_workspace(struct sway_output *output) {  	struct sway_seat *seat = input_manager_current_seat();  	struct sway_node *focus = seat_get_active_tiling_child(seat, &output->node);  	if (!focus) { +		if (!output->workspaces->length) { +			return NULL; +		}  		return output->workspaces->items[0];  	}  	return focus->sway_workspace;  | 
