]> sigrok.org Git - pulseview.git/commitdiff
DecodeSignal: Void a session pointer after destroy() call
authorGerhard Sittig <redacted>
Tue, 2 Jan 2018 18:51:22 +0000 (19:51 +0100)
committerUwe Hermann <redacted>
Thu, 11 Jan 2018 20:42:45 +0000 (21:42 +0100)
Fixup an error path when starting a created decoder session fails.

pv/data/decodesignal.cpp

index eb7a0d3b78557f413ba10a57fdf477681a13c75f..2a3ad14b56743b5d7adb5b152aa76cfd03320807 100644 (file)
@@ -993,6 +993,7 @@ void DecodeSignal::start_srd_session()
                if (!di) {
                        error_message_ = tr("Failed to create decoder instance");
                        srd_session_destroy(srd_session_);
+                       srd_session_ = nullptr;
                        return;
                }