Properly initialize session
This commit is contained in:
parent
e52bb9be83
commit
fa93154fe6
|
@ -23,6 +23,8 @@
|
||||||
#include "libsigrok.h"
|
#include "libsigrok.h"
|
||||||
#include "libsigrok-internal.h"
|
#include "libsigrok-internal.h"
|
||||||
|
|
||||||
|
extern struct sr_session *session;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @mainpage libsigrok API
|
* @mainpage libsigrok API
|
||||||
*
|
*
|
||||||
|
@ -366,6 +368,7 @@ SR_API int sr_init(struct sr_context **ctx)
|
||||||
|
|
||||||
*ctx = context;
|
*ctx = context;
|
||||||
context = NULL;
|
context = NULL;
|
||||||
|
session = NULL;
|
||||||
ret = SR_OK;
|
ret = SR_OK;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in New Issue