get_output_for_con: Assert result != NULL
- The result from con_get_output was always not NULL because con_get_output asserts so - get_output_by_name should always be able to get an output from the corresponding container - workspace_move_to_output doesn't return bool anymore since it can't fail
This commit is contained in:
10
src/output.c
10
src/output.c
@ -54,16 +54,8 @@ char *output_primary_name(Output *output) {
|
||||
|
||||
Output *get_output_for_con(Con *con) {
|
||||
Con *output_con = con_get_output(con);
|
||||
if (output_con == NULL) {
|
||||
ELOG("Could not get the output container for con = %p.\n", con);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Output *output = get_output_by_name(output_con->name, true);
|
||||
if (output == NULL) {
|
||||
ELOG("Could not get output from name \"%s\".\n", output_con->name);
|
||||
return NULL;
|
||||
}
|
||||
assert(output != NULL);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
Reference in New Issue
Block a user