Skip to content

Commit

Permalink
Make sure empty _settings is initialized as json dict
Browse files Browse the repository at this point in the history
Prevent "Cannot use erase() with null" error when unsetting
keys on empty (null) _settings object.

Ref #154
  • Loading branch information
maxnet committed Sep 10, 2022
1 parent 5dcf6bd commit 6b10fa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
piserver (0.7.5) buster; urgency=medium

* Fix "Cannot use erase() with null" error when using
non-ad external LDAP server

-- Floris Bos <[email protected]> Sat, 10 Sep 2022 23:42:33 +0200

piserver (0.7.4) buster; urgency=medium

* Update convert script for bullseye
Expand Down
2 changes: 1 addition & 1 deletion src/piserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace std;
using nlohmann::json;

PiServer::PiServer()
: _ldap(NULL)
: _ldap(NULL), _settings({})
{
#ifdef LOCALEDIR
setlocale(LC_ALL, "");
Expand Down

0 comments on commit 6b10fa2

Please sign in to comment.