Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions shell/platform/linux/fl_method_call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,22 @@ G_MODULE_EXPORT gboolean fl_method_call_respond(FlMethodCall* self,
GError** error) {
g_return_val_if_fail(FL_IS_METHOD_CALL(self), FALSE);
g_return_val_if_fail(FL_IS_METHOD_RESPONSE(response), FALSE);
return fl_method_channel_respond(self->channel, self->response_handle,
response, error);

g_autoptr(GError) local_error = nullptr;
if (!fl_method_channel_respond(self->channel, self->response_handle, response,
&local_error)) {
// If the developer chose not to handle the error then log it so it's not
// missed.
if (error == nullptr) {
g_warning("Failed to send method call response: %s",
local_error->message);
}

g_propagate_error(error, local_error);
return FALSE;
}

return TRUE;
}

G_MODULE_EXPORT gboolean fl_method_call_respond_success(FlMethodCall* self,
Expand Down