From: Uwe Hermann Date: Wed, 9 Jan 2019 00:19:56 +0000 (+0100) Subject: Srf::init(): Throw an exception if Gst::init() has not run yet. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7bc190e877a5f50dc18ec534d0e00b3cbd1fe71e;p=libsigrokflow.git Srf::init(): Throw an exception if Gst::init() has not run yet. --- diff --git a/src/main.cpp b/src/main.cpp index f352351..b01ee39 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,9 @@ void init() if (srf_initialized_) throw runtime_error("libsigrokflow is already initialized"); + if (!Gst::is_initialized()) + throw runtime_error("Gst::init() has not run yet"); + #ifdef HAVE_LIBSIGROKCXX Gst::Plugin::register_static(GST_VERSION_MAJOR, GST_VERSION_MINOR, "sigrok_legacy_capture_device",