Writer fix: don't skip first notification
[babeltrace.git] / plugins / writer / writer.c
index ad268ebf74aa6fc28c4615fb901ff9004031c89d..525f0d579fc80c9eff5e52ddc59c81991e8ccc2d 100644 (file)
@@ -193,17 +193,17 @@ enum bt_component_status run(struct bt_component *component)
                goto end;
        }
 
-       ret = bt_notification_iterator_next(it);
-       if (ret != BT_COMPONENT_STATUS_OK) {
-               goto end;
-       }
-
        notification = bt_notification_iterator_get_notification(it);
        if (!notification) {
                ret = BT_COMPONENT_STATUS_ERROR;
                goto end;
        }
 
+       ret = bt_notification_iterator_next(it);
+       if (ret != BT_COMPONENT_STATUS_OK) {
+               goto end;
+       }
+
        ret = handle_notification(writer_component, notification);
 end:
        bt_put(it);
This page took 0.023551 seconds and 4 git commands to generate.