Skip to content

Fix exception escape in proton/wine#66

Open
lilmike wants to merge 1 commit into
ethindp:masterfrom
lilmike:master
Open

Fix exception escape in proton/wine#66
lilmike wants to merge 1 commit into
ethindp:masterfrom
lilmike:master

Conversation

@lilmike

@lilmike lilmike commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

ApiInformation::IsTypePresent in the one core initializer ran outside the try-catch block. In proton/wine those functions threw E_NOTIMPL, which bubbled out of the initializer and could crash programs using prism. I simply moved the try opening to the beginning of the initializer to avoid this.

Note this may need testing, I don't use prism for windows much so haven't had a chance to test it heavily.

ApiInformation::IsTypePresent in the one core initializer ran outside
the try-catch block. In proton/wine those functions threw E_NOTIMPL,
which bubbled out of the initializer and could crash programs using
prism. I simply moved the try opening to the beginning of the
initializer to avoid this.
@ethindp

ethindp commented Jun 29, 2026

Copy link
Copy Markdown
Owner

@lilmike This is good although you will need to do the same in get_features. (I wasn't aware that ApiInformation::IsTypePresent could or did throw, since the docs don't mention it able to throw exceptions at all.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants