summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/abstract_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-14 22:19:33 +0100
committerRobin Gareus <robin@gareus.org>2016-12-14 22:39:18 +0100
commit77845f601912c0237fb40a19d401ca64bac542b1 (patch)
tree66a36d3b0493365843bd47acf2e16f5969bc9b68 /libs/pbd/pbd/abstract_ui.cc
parent7dbdf6cc6dd2878edbf58d52a01a2192a0d18a0e (diff)
Atomically to invalidate request
Yet another slightly overkill approach, but it /may/ explain crashes.
Diffstat (limited to 'libs/pbd/pbd/abstract_ui.cc')
-rw-r--r--libs/pbd/pbd/abstract_ui.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/pbd/pbd/abstract_ui.cc b/libs/pbd/pbd/abstract_ui.cc
index 330e6ddc59..db63c3f96d 100644
--- a/libs/pbd/pbd/abstract_ui.cc
+++ b/libs/pbd/pbd/abstract_ui.cc
@@ -168,7 +168,7 @@ AbstractUI<RequestObject>::get_request (RequestType rt)
DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1: allocated per-thread request of type %2, caller %3\n", event_loop_name(), rt, pthread_name()));
vec.buf[0]->type = rt;
- vec.buf[0]->valid = true;
+ vec.buf[0]->validate ();
return vec.buf[0];
}
@@ -218,7 +218,7 @@ AbstractUI<RequestObject>::handle_ui_requests ()
if (vec.len[0] == 0) {
break;
} else {
- if (vec.buf[0]->valid) {
+ if (vec.buf[0]->valid ()) {
/* We first need to remove the event from the list.
* If the event results in object destruction, PBD::EventLoop::invalidate_request
* will delete the invalidation record (aka buf[0]), so we cannot use it after calling do_request
@@ -327,7 +327,7 @@ AbstractUI<RequestObject>::handle_ui_requests ()
}
}
- if (!req->valid) {
+ if (!req->valid ()) {
DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1/%2 handling invalid heap request, type %3, deleting\n", event_loop_name(), pthread_name(), req->type));
delete req;
continue;