Fix 31370: light falloff node linear output not working code.

Fix part of thread safety issue, there's still something else wrong.
This commit is contained in:
Brecht Van Lommel
2012-05-08 19:57:56 +00:00
parent 81255ca8ce
commit d9a70ceeb1
2 changed files with 4 additions and 2 deletions

View File

@@ -153,8 +153,10 @@ public:
void set_update()
{
if(update_cb)
if(update_cb) {
thread_scoped_lock lock(update_mutex);
update_cb();
}
}
void set_update_callback(boost::function<void(void)> function)
@@ -164,6 +166,7 @@ public:
protected:
thread_mutex progress_mutex;
thread_mutex update_mutex;
boost::function<void(void)> update_cb;
boost::function<void(void)> cancel_cb;