Skip to content

Commit

Permalink
avoid nullptr as the param of fl_value_new_string
Browse files Browse the repository at this point in the history
Signed-off-by: fufesou <[email protected]>
  • Loading branch information
fufesou committed Aug 16, 2023
1 parent d3d4f87 commit 10ebd5a
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 10ebd5a

Please sign in to comment.