This fixes possible free-after-use cases caused by the node lists in MPDevice containing raw pointers and the parent nodes having their child nodes set as QObject children. The QObject children of a parent node are automatically freed when a parent node is destructed, but if their corresponding raw pointers aren't removed from the node lists they may cause free-after-use bugs.
This patch removes the child nodes from the local DB before removing the parent to prevent this from happening.
This fixes possible free-after-use cases caused by the node lists in MPDevice containing raw pointers and the parent nodes having their child nodes set as QObject children. The QObject children of a parent node are automatically freed when a parent node is destructed, but if their corresponding raw pointers aren't removed from the node lists they may cause free-after-use bugs.
This patch removes the child nodes from the local DB before removing the parent to prevent this from happening.
Closes #1135