diff options
| author | morefigs <morefigs@gmail.com> | 2017-03-04 10:44:08 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-04 10:44:08 +1100 |
| commit | 5178d9b92f6ff3b07e74aee50d5352efeaff5f0c (patch) | |
| tree | d8be2eaa22f55524f41ff040f25f67da78e92814 | |
| parent | 3c6c75e07c513595a639e4af9aed23d1e8f2b4ff (diff) | |
| parent | 38f7d917b91f38c5794247eac9785b7cffebd9bd (diff) | |
| download | pymba-5178d9b92f6ff3b07e74aee50d5352efeaff5f0c.tar.gz pymba-5178d9b92f6ff3b07e74aee50d5352efeaff5f0c.zip | |
Merge pull request #38 from jrast/bugfix/getInterfaceInfosCrash
Fixed _getIntrerfaceInfos() to avoid python crash
| -rw-r--r-- | pymba/vimba.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pymba/vimba.py b/pymba/vimba.py index 2f78ea5..f81d3c0 100644 --- a/pymba/vimba.py +++ b/pymba/vimba.py @@ -63,7 +63,6 @@ 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 @@ -71,9 +70,8 @@ class Vimba(object): 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( |
