]> sigrok.org Git - pulseview.git/commitdiff
Segment: Catch by reference
authorSoeren Apel <redacted>
Tue, 7 Aug 2018 18:09:22 +0000 (20:09 +0200)
committerUwe Hermann <redacted>
Tue, 21 Aug 2018 10:02:38 +0000 (12:02 +0200)
pv/data/segment.cpp

index 7b8e611f271999d6b3a57948166322faccaa71bf..5022d6a900f7064c683c5f0d3ab9f80d5feeb100 100644 (file)
@@ -194,7 +194,7 @@ void Segment::append_samples(void* data, uint64_t samples)
                                auto dummy_chunk = new uint8_t[dummy_size];
                                memset(dummy_chunk, 0xFF, dummy_size);
                                delete[] dummy_chunk;
-                       } catch (bad_alloc) {
+                       } catch (bad_alloc&) {
                                delete[] current_chunk_;  // The new may have succeeded
                                current_chunk_ = nullptr;
                                throw;