Fix: define _LGPL_SOURCE in C files
[lttng-tools.git] / src / common / consumer.c
index cba4a605a4f8d119d4f324427fe81761b605c240..e37c725c49b095a7c64c6a1b6cd58a52ddb7e803 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <assert.h>
 #include <poll.h>
 #include <pthread.h>
@@ -1404,6 +1405,10 @@ void lttng_consumer_destroy(struct lttng_consumer_local_data *ctx)
 
        DBG("Consumer destroying it. Closing everything.");
 
+       if (!ctx) {
+               return;
+       }
+
        destroy_data_stream_ht(data_ht);
        destroy_metadata_stream_ht(metadata_ht);
 
This page took 0.026048 seconds and 5 git commands to generate.