Fix: destroy_pretty_data: move NULL check earlier
[babeltrace.git] / src / plugins / text / pretty / pretty.c
index a925b7d8fce9b9c9b936ef535b0e007d2b253882..3ea6c54ad4be2316d99ebd93c2db34ee52c7bbe9 100644 (file)
@@ -46,12 +46,12 @@ const char * const in_port_name = "in";
 static
 void destroy_pretty_data(struct pretty_component *pretty)
 {
-       bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
-
        if (!pretty) {
                goto end;
        }
 
+       bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
+
        if (pretty->string) {
                (void) g_string_free(pretty->string, TRUE);
        }
This page took 0.024209 seconds and 4 git commands to generate.