]> sigrok.org Git - pulseview.git/blobdiff - pv/logging.cpp
Fix build with -DENABLE_DECODE=n.
[pulseview.git] / pv / logging.cpp
index 1d4eb7c9b92ee29b6a806fa8c9464fa05765d81a..49b7d5828359962dcc0f4fbdc274865c783c826d 100644 (file)
@@ -36,7 +36,7 @@ const int Logging::MAX_BUFFER_SIZE = 50000;
 
 Logging::~Logging()
 {
-       qInstallMessageHandler(0);
+       qInstallMessageHandler(nullptr);
        sr_log_callback_set_default();
 #ifdef ENABLE_DECODE
        srd_log_callback_set_default();
@@ -72,7 +72,9 @@ int Logging::get_log_level() const
 void Logging::set_log_level(int level)
 {
        sr_log_loglevel_set(level);
+#ifdef ENABLE_DECODE
        srd_log_loglevel_set(level);
+#endif
 }
 
 QString Logging::get_log() const