Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2ab03a09
Commit
2ab03a09
authored
May 22, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/ScopeExit: allow the function to throw
Fixes crash inside AtScopeExit() in the WASAPI output plugin. Closes
https://github.com/MusicPlayerDaemon/MPD/issues/1759
parent
2fa8c7d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ScopeExit.hxx
src/util/ScopeExit.hxx
+5
-1
No files found.
src/util/ScopeExit.hxx
View file @
2ab03a09
...
@@ -47,7 +47,11 @@ public:
...
@@ -47,7 +47,11 @@ public:
src
.
enabled
=
false
;
src
.
enabled
=
false
;
}
}
~
ScopeExitGuard
()
{
/* destructors are "noexcept" by default; this explicit
"noexcept" declaration allows the destructor to throw if
the function can throw; without this, a throwing function
would std::terminate() */
~
ScopeExitGuard
()
noexcept
(
noexcept
(
F
::
operator
()()))
{
if
(
enabled
)
if
(
enabled
)
F
::
operator
()();
F
::
operator
()();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment