]> sigrok.org Git - pulseview.git/commitdiff
DecoderStack: Fix "data may be unitialized" error
authorSoeren Apel <redacted>
Sun, 4 Dec 2016 18:45:30 +0000 (19:45 +0100)
committerSoeren Apel <redacted>
Sun, 4 Dec 2016 18:45:30 +0000 (19:45 +0100)
pv/data/decoderstack.cpp

index d01bab2de111b155c9880ecf72a4fd3806316e62..648b4cf57917a0cf3ea0a608942b1313c88719a6 100644 (file)
@@ -240,7 +240,7 @@ void DecoderStack::begin_decode()
        // This works because we are currently assuming all
        // logic signals have the same data/segment
        pv::data::SignalBase *signalbase;
-       pv::data::Logic *data;
+       pv::data::Logic *data = nullptr;
 
        for (const shared_ptr<decode::Decoder> &dec : stack_)
                if (dec && !dec->channels().empty() &&