From a4a57832d53beeada737eec4cebc5e586438cac8 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Sun, 30 Jun 2019 00:31:31 +0200 Subject: [PATCH] fix segfault --- knxPython/knxmodule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knxPython/knxmodule.cpp b/knxPython/knxmodule.cpp index 4322bac..a0db49e 100644 --- a/knxPython/knxmodule.cpp +++ b/knxPython/knxmodule.cpp @@ -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);