removeProperty is called in the BaseClient thread and provides a pointer to…

Authored by mutlaqja on Mar 26 2020, 2:30 PM.

Description

removeProperty is called in the BaseClient thread and provides a pointer to INDI::Property object. Since INDI_D::removeProperty method needs to run in the main GUI thread, we need to invoke the method in the primary thread. However, blocking the calling thread to do so might result in deadlock. Using QueueConnection solves one issue, but by the time removeProperty is invoked, the INDI::Property object could have been deleted already resulting in a crash.

The current solution uses the name of the property to invoke the method in the primary thread using QueuedConnection, however, there is no pointer to lose now since we just send the name.

Details

Committed
mutlaqjaMar 26 2020, 2:30 PM
Parents
R321:c24ff635fbbe: Fix crash on new profile with indihub
Branches
Unknown
Tags
Unknown