X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Fgraph%2Fcomponent.c;h=65978e944cab83f5b1ce18f0070d437ee382ad2a;hb=43c59509042845f8d42c3e99ec74d45fa2dc0908;hp=b5591c9eb4f48152eed3bb76e6ed80022d109a98;hpb=6ecdcca3de0dea694cdfb252160c7939f7dc2ef1;p=babeltrace.git diff --git a/src/lib/graph/component.c b/src/lib/graph/component.c index b5591c9e..65978e94 100644 --- a/src/lib/graph/component.c +++ b/src/lib/graph/component.c @@ -29,11 +29,8 @@ #include "lib/assert-pre.h" #include "lib/assert-post.h" #include -#include -#include -#include -#include -#include +#include +#include #include "common/macros.h" #include "compat/compiler.h" #include @@ -104,9 +101,18 @@ void finalize_component(struct bt_component *comp) } if (method) { + const struct bt_error *saved_error; + + saved_error = bt_current_thread_take_error(); + BT_LIB_LOGI("Calling user's component finalization method: " "%![comp-]+c", comp); method(comp); + BT_ASSERT_POST_NO_ERROR(); + + if (saved_error) { + BT_CURRENT_THREAD_MOVE_ERROR_AND_RESET(saved_error); + } } }