mavlink/qgroundcontrol — Issue #31: UASWaypointManager::send* has useless if (uas) checks
Author: Susurrus
Created: 2012-02-08 18:04:35+00:00
State: open

At the beginning of all ```UASWaypointManager::send*()``` functions there's a check for ```if (!uas) ...```. This is fine, but then this check is done again before sending the message. I'm not certain if the ```uas``` variable can go NULL during the function execution as QGC is multithreaded I believe, but even if it does the ```mavlink_msg_mission_*_encode()``` function will actually fail anyways due to accessing properties of ```uas```. Therefore this second check should either be moved ahead of ```mavlink_msg_*_encode()``` and wrap it and the sendMessage() and sleep calls OR it should be removed.