mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
fix segfault
This commit is contained in:
parent
07a141965f
commit
a4a57832d5
@ -153,7 +153,7 @@ PYBIND11_MODULE(knx, m)
|
|||||||
});
|
});
|
||||||
m.def("GetGroupObject", [](uint16_t goNr)
|
m.def("GetGroupObject", [](uint16_t goNr)
|
||||||
{
|
{
|
||||||
if(!bau)
|
if(!bau || goNr > bau->groupObjectTable().entryCount())
|
||||||
return (GroupObject*)nullptr;
|
return (GroupObject*)nullptr;
|
||||||
|
|
||||||
return &bau->groupObjectTable().get(goNr);
|
return &bau->groupObjectTable().get(goNr);
|
||||||
|
Loading…
Reference in New Issue
Block a user