Skip to content

fix: Calling empty callbacks#1233

Merged
COM8 merged 2 commits into
libcpr:masterfrom
nlogozzo:fix-callbacks
Jul 11, 2025
Merged

fix: Calling empty callbacks#1233
COM8 merged 2 commits into
libcpr:masterfrom
nlogozzo:fix-callbacks

Conversation

@nlogozzo

@nlogozzo nlogozzo commented Jul 6, 2025

Copy link
Copy Markdown
Contributor

When setting empty callbacks via session.setProgressCallback({}) or other methods, a bad_function_call will be thrown when calling the callback.

This PR will check if callbacks are empty before calling them to prevent this.

@COM8 COM8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nlogozzo thanks!

@COM8 COM8 added the Bug 🐛 label Jul 11, 2025
@COM8 COM8 merged commit 83ba905 into libcpr:master Jul 11, 2025
33 of 36 checks passed
@nlogozzo nlogozzo deleted the fix-callbacks branch July 11, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants