Cleanup: rename `get_domain_str()` -> `lttng_domain_type_str()`
[lttng-tools.git] / src / bin / lttng / commands / add_trigger.c
index e4111eba095a494987f60740a1e191b921fd3973..8fb79d3786c577842475ea9724f92293ec591800 100644 (file)
@@ -18,6 +18,7 @@
 #include "common/mi-lttng.h"
 #include "common/string-utils/string-utils.h"
 #include "common/utils.h"
+#include <lttng/domain-internal.h>
 /* For lttng_event_rule_type_str(). */
 #include <lttng/event-rule/event-rule-internal.h>
 #include <lttng/lttng.h>
@@ -2428,7 +2429,7 @@ error:
 
 end:
        /* Mi closing. */
-       if (lttng_opt_mi) {
+       if (lttng_opt_mi && mi_writer) {
                int mi_ret;
 
                /* Close output element. */
This page took 0.023029 seconds and 4 git commands to generate.