diff options
| author | Jürg Rast <juergr@gmail.com> | 2016-05-12 16:56:28 +0200 |
|---|---|---|
| committer | Jürg Rast <juergr@gmail.com> | 2016-06-15 11:55:49 +0200 |
| commit | 38f7d917b91f38c5794247eac9785b7cffebd9bd (patch) | |
| tree | 293c3a2cd589b0c1d9baabccb3965dad5f0a64e3 | |
| parent | a2fb906a6bff1c5212cb44a2faab734ca26a1eeb (diff) | |
| download | pymba-38f7d917b91f38c5794247eac9785b7cffebd9bd.tar.gz pymba-38f7d917b91f38c5794247eac9785b7cffebd9bd.zip | |
BugFix: fixed crash during _getInterfaceInfos() call
| -rw-r--r-- | pymba/vimba.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pymba/vimba.py b/pymba/vimba.py index 1096917..f81d3c0 100644 --- a/pymba/vimba.py +++ b/pymba/vimba.py @@ -63,17 +63,15 @@ class Vimba(object): """ if self._interfaceInfos is None: # args - dummyInterfaceInfo = structs.VimbaInterfaceInfo() numFound = c_uint32(-1) # call once just to get the number of interfaces # Vimba DLL will return an error code - errorCode = VimbaDLL.interfacesList(byref(dummyInterfaceInfo), + errorCode = VimbaDLL.interfacesList(None, 0, byref(numFound), - sizeof(dummyInterfaceInfo)) + sizeof(structs.VimbaInterfaceInfo)) if errorCode != 0: - print errorCode raise VimbaException(errorCode) numInterfaces = numFound.value @@ -86,7 +84,7 @@ class Vimba(object): errorCode = VimbaDLL.interfacesList(interfaceInfoArray, numInterfaces, byref(numFound), - sizeof(dummyInterfaceInfo)) + sizeof(structs.VimbaInterfaceInfo)) if errorCode != 0: raise VimbaException(errorCode) self._interfaceInfos = list( |
