We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在WindowManagerPlugin析构时应将channel置为空指针。在析构之后还传递窗口消息,在invokeMethod方法内会出现messenger_指针异常问题。复现方法为在退出应用前调用关闭窗口的方法,再退出应用。
下面为我解决该问题添加的指针处理:
WindowManagerPlugin::~WindowManagerPlugin() { registrar->UnregisterTopLevelWindowProcDelegate(window_proc_id); channel = nullptr; } void WindowManagerPlugin::_EmitEvent(std::string eventName) { if (channel) { flutter::EncodableMap args = flutter::EncodableMap(); args[flutter::EncodableValue("eventName")] = flutter::EncodableValue(eventName); channel->InvokeMethod("onEvent", std::make_unique<flutter::EncodableValue>(args)); } }
The text was updated successfully, but these errors were encountered:
fix: crash after deconstruction #423
8fa23db
Fixed in this commit 8fa23db
Sorry, something went wrong.
lijy91
No branches or pull requests
在WindowManagerPlugin析构时应将channel置为空指针。在析构之后还传递窗口消息,在invokeMethod方法内会出现messenger_指针异常问题。复现方法为在退出应用前调用关闭窗口的方法,再退出应用。
下面为我解决该问题添加的指针处理:
The text was updated successfully, but these errors were encountered: