]> sigrok.org Git - libsigrokflow.git/commitdiff
Srf::init(): Throw an exception if Gst::init() has not run yet.
authorUwe Hermann <redacted>
Wed, 9 Jan 2019 00:19:56 +0000 (01:19 +0100)
committerUwe Hermann <redacted>
Wed, 9 Jan 2019 00:19:56 +0000 (01:19 +0100)
src/main.cpp

index f3523517fdc11dc8616d2e0be2e54f28631a0981..b01ee39deaaddfdd5a9c1ce9ac8fcb01adbef737 100644 (file)
@@ -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",