Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential null pointer dereferences in mythsocketmanager.
Recent changes to Qt6 or the compiler have produced new null pointer dereference warnings. Apparently every call to a begin()/find() function has a code path that can return the end() iterator (which makes sense), and dereferencing the end() iterator in Qt6 is a null pointer dereference. This means that any call to a function returning an iterator must be followed by a validity test before dereferencing that iterator. Prior checks for !empty() do not help, as another thread could have removed the last item between the time of the empty check and the time of the begin call. Rewrite the code to eliminate this warning.
- Loading branch information