projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d361b99
)
Make reset() safer if the new throws.
author
Carl Hetherington
<cth@carlh.net>
Mon, 16 Jan 2023 00:13:25 +0000
(
01:13
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 16 Jan 2023 00:13:25 +0000
(
01:13
+0100)
src/wx/wx_ptr.h
patch
|
blob
|
history
diff --git
a/src/wx/wx_ptr.h
b/src/wx/wx_ptr.h
index 24bccb0438a517b59a9c9a8b4d70c9149a87380c..fcca8b18bafb602744c9befb8ab5971bace1a7a7 100644
(file)
--- a/
src/wx/wx_ptr.h
+++ b/
src/wx/wx_ptr.h
@@
-95,6
+95,7
@@
public:
{
if (_wx) {
_wx->Destroy();
+ _wx = nullptr;
}
_wx = new T(std::forward<Args>(args)...);
}