]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/classes.cpp
bindings/cxx/classes.cpp: Fix sr_session_load() invocation.
[libsigrok.git] / bindings / cxx / classes.cpp
index c88dc56683473d21c419333a5a0aa231b9d85195..850225fdd467840630442442ab2159e3f852022d 100644 (file)
@@ -888,7 +888,7 @@ Session::Session(shared_ptr<Context> context) :
        _context(context),
        _saving(false)
 {
-       check(sr_session_new(context->structure, &_structure));
+       check(sr_session_new(context->_structure, &_structure));
        _context->_session = this;
 }
 
@@ -898,7 +898,7 @@ Session::Session(shared_ptr<Context> context, string filename) :
        _filename(filename),
        _saving(false)
 {
-       check(sr_session_load(filename.c_str(), &_structure));
+       check(sr_session_load(context->_structure, filename.c_str(), &_structure));
        GSList *dev_list;
        check(sr_session_dev_list(_structure, &dev_list));
        for (GSList *dev = dev_list; dev; dev = dev->next)