mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix warning when no entrypoing args provided. (flutter/engine#22136)
Fixes errors like: GLib-CRITICAL **: 14:20:17.248: g_strv_length: assertion 'str_array != NULL' failed Introduced in fe489569a722816acab038ebe0f882722d2434ee
This commit is contained in:
parent
904e5d491e
commit
524a96de10
@ -395,7 +395,8 @@ gboolean fl_engine_start(FlEngine* self, GError** error) {
|
||||
args.platform_message_callback = fl_engine_platform_message_cb;
|
||||
args.custom_task_runners = &custom_task_runners;
|
||||
args.shutdown_dart_vm_when_done = true;
|
||||
args.dart_entrypoint_argc = g_strv_length(dart_entrypoint_args);
|
||||
args.dart_entrypoint_argc =
|
||||
dart_entrypoint_args != nullptr ? g_strv_length(dart_entrypoint_args) : 0;
|
||||
args.dart_entrypoint_argv =
|
||||
reinterpret_cast<const char* const*>(dart_entrypoint_args);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user