Skip to content
Snippets Groups Projects
Commit c4fc51a2 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Andreas Traczyk
Browse files

upnp: fix early crash by std::terminate


In NAP-PMP implementation, a std::thread member of
UPnPContext class is placed before member used by the thread.
This thread is run during the class initialization (ctor).
So the thread can start and access to these members when
they are not initialized.

The consequence is a std::terminate() call causing the stop
of daemon.

Fix that by moving the thread member after *ALL* used members.

Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Change-Id: Ibb7334e653a9c80c566ffc3944c93a6ef64e0a8b
parent 72735404
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment