From: Uwe Hermann Date: Tue, 8 Jan 2019 22:36:10 +0000 (+0100) Subject: Srf::deinit(): Throw an exception upon multiple deinit() calls. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8272aafa64c15180f3d063c83592f64a1b2e8a9c;p=libsigrokflow.git Srf::deinit(): Throw an exception upon multiple deinit() calls. --- diff --git a/src/main.cpp b/src/main.cpp index 8f95317..f352351 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,6 +65,9 @@ void init() void deinit() { + if (!srf_initialized_) + throw runtime_error("libsigrokflow is not initialized"); + srf_initialized_ = false; }