Skip to content

Throw ObjectDisposedException for ClipboardImpl/ClipboardDataObject #17472

New issue

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

Merged

Conversation

MrJul
Copy link
Member

@MrJul MrJul commented Nov 11, 2024

What does the pull request do?

This PR changes Avalonia.Native.ClipboardImpl and Avalonia.Native.ClipboardDataObject to throw ObjectDisposedException after they're disposed.

It also adds nullable annotations for this file.

What is the current behavior?

Using the objects after disposal results in a NullReferenceException.

@MrJul MrJul added the bug label Nov 11, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053212-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2024
@MrJul MrJul merged commit 337a56f into AvaloniaUI:master Nov 12, 2024
11 checks passed
@MrJul MrJul deleted the fix/dataobject-add-objectdisposedexception branch December 21, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants