Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 0e1feaf

Browse files
committed
Just don't request an exit if not ready
1 parent 8ef4186 commit 0e1feaf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

shell/platform/linux/fl_platform_plugin.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,15 @@ static void request_app_exit_response_cb(GObject* object,
237237
}
238238
}
239239

240-
// Send a request to Flutter to exit the application.
240+
// Send a request to Flutter to exit the application, but only if it's ready for
241+
// a request.
241242
static void request_app_exit(FlPlatformPlugin* self, const char* type) {
242243
g_autoptr(FlValue) args = fl_value_new_map();
244+
if (!self->app_initialization_complete ||
245+
g_str_equal(type, kExitTypeRequired)) {
246+
quit_application();
247+
}
248+
243249
fl_value_set_string_take(args, kExitTypeKey, fl_value_new_string(type));
244250
fl_method_channel_invoke_method(self->channel, kRequestAppExitMethod, args,
245251
self->cancellable,

0 commit comments

Comments
 (0)