Skip to content

Commit

Permalink
[linux] fix getTitle() crash when null (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi committed Jan 4, 2023
1 parent d4c0023 commit 41c7285
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion linux/window_manager_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ static FlMethodResponse* set_always_on_bottom(WindowManagerPlugin* self,

static FlMethodResponse* get_title(WindowManagerPlugin* self) {
const gchar* title = gtk_window_get_title(get_window(self));
g_autoptr(FlValue) result = fl_value_new_string(title);
g_autoptr(FlValue) result =
fl_value_new_string(title != nullptr ? title : "");
return FL_METHOD_RESPONSE(fl_method_success_response_new(result));
}

Expand Down

0 comments on commit 41c7285

Please sign in to comment.