Skip to content

Commit

Permalink
avoid nullptr as the param of fl_value_new_string (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: fufesou <[email protected]>
  • Loading branch information
fufesou authored Aug 27, 2023
1 parent e3b725a commit e101d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linux/screen_retriever_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ FlValue* monitor_to_flvalue(GdkMonitor* monitor) {

auto value = fl_value_new_map();
fl_value_set_string_take(value, "id", fl_value_new_float(0));
fl_value_set_string_take(value, "name", fl_value_new_string(name));
fl_value_set_string_take(value, "name", fl_value_new_string(name == nullptr ? "" : name));
fl_value_set_string_take(value, "size", size);
fl_value_set_string_take(value, "visibleSize", visible_size);
fl_value_set_string_take(value, "visiblePosition", visible_position);
Expand Down

0 comments on commit e101d85

Please sign in to comment.