X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=srd.c;h=1c7f6f92e59fcb895940a8225477bd50047a9ac9;hp=07d79523ae859dd3d8de5d5e7d71ce0455dcf220;hb=eaad935fbaa3c301aded9c64dfe514cc4ca40968;hpb=190b71cfebc1dd000d3203c7300a10afd96c1201 diff --git a/srd.c b/srd.c index 07d7952..1c7f6f9 100644 --- a/srd.c +++ b/srd.c @@ -263,4 +263,14 @@ SRD_PRIV int srd_decoder_searchpath_add(const char *path) return SRD_OK; } +/* @private */ +SRD_PRIV gboolean srd_check_init(void) +{ + if (max_session_id < 0) { + srd_err("Library is not initialized."); + return FALSE; + } else + return TRUE; +} + /** @} */