]> sigrok.org Git - libsigrokflow.git/commitdiff
Srf::deinit(): Throw an exception upon multiple deinit() calls.
authorUwe Hermann <redacted>
Tue, 8 Jan 2019 22:36:10 +0000 (23:36 +0100)
committerUwe Hermann <redacted>
Tue, 8 Jan 2019 23:57:10 +0000 (00:57 +0100)
src/main.cpp

index 8f9531730013829c91828f66992d5a829c3f5f87..f3523517fdc11dc8616d2e0be2e54f28631a0981 100644 (file)
@@ -65,6 +65,9 @@ void init()
 
 void deinit()
 {
+       if (!srf_initialized_)
+               throw runtime_error("libsigrokflow is not initialized");
+               
        srf_initialized_ = false;
 }