fix segfault

This commit is contained in:
Thomas Kunze 2019-06-30 00:31:31 +02:00
parent 07a141965f
commit a4a57832d5

View File

@ -153,7 +153,7 @@ PYBIND11_MODULE(knx, m)
});
m.def("GetGroupObject", [](uint16_t goNr)
{
if(!bau)
if(!bau || goNr > bau->groupObjectTable().entryCount())
return (GroupObject*)nullptr;
return &bau->groupObjectTable().get(goNr);