projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d5beb0
)
Fix crash on emitting a signal during a constructor.
author
Carl Hetherington
<cth@carlh.net>
Thu, 14 Apr 2016 01:20:48 +0000
(
02:20
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 18 May 2016 10:50:29 +0000
(11:50 +0100)
src/lib/content.cc
patch
|
blob
|
history
diff --git
a/src/lib/content.cc
b/src/lib/content.cc
index 499f90dd11d4980b4035a007ae8343b0ba929f35..3b9c3e3a1e55e13503641b4fd6d8c3586f87122f 100644
(file)
--- a/
src/lib/content.cc
+++ b/
src/lib/content.cc
@@
-155,8
+155,12
@@
Content::examine (shared_ptr<Job> job)
void
Content::signal_changed (int p)
{
- changed (p);
- emit (boost::bind (boost::ref (Changed), shared_from_this (), p, _change_signals_frequent));
+ try {
+ emit (boost::bind (boost::ref (Changed), shared_from_this (), p, _change_signals_frequent));
+ changed (p);
+ } catch (boost::bad_weak_ptr) {
+ /* This must be during construction; never mind */
+ }
}
void