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

[Windows] Fix crash if clipboard is set to null#40238

Merged
loic-sharma merged 2 commits intoflutter:mainfrom
loic-sharma:windows_clipboard_crash
Mar 16, 2023
Merged

[Windows] Fix crash if clipboard is set to null#40238
loic-sharma merged 2 commits intoflutter:mainfrom
loic-sharma:windows_clipboard_crash

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Mar 11, 2023

Currently, the framework allows setting the clipboard to null. This was an unintentional mistake from the null safety migration and platforms handle this case incorrectly. We will update the framework to disallow setting the clipboard's data to null: flutter/flutter#122446

In the meantime, this change makes the Windows embedder resilient to unexpected clipboard messages. If your clipboard data's text is unexpected, you will now get an error instead of crashing your app.

Part of flutter/flutter#121976

@loic-sharma loic-sharma force-pushed the windows_clipboard_crash branch from ed19733 to efc04c2 Compare March 11, 2023 00:24
@loic-sharma loic-sharma changed the title [Windows] Fix crash if clipboard set to null [Windows] Fix crash if clipboard is set to null Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants