Fix deadlock
Fix deadlock

Hunter522/qgroundcontrol,scott-eddy/qgroundcontrol,cfelipesouza/qgroundcontrol,catch-twenty-two/qgroundcontrol,ethz-asl/qgc_asl,remspoor/qgroundcontrol,CornerOfSkyline/qgroundcontrol,Hunter522/qgroundcontrol,Hunter522/qgroundcontrol,scott-eddy/qgroundcontrol,ethz-asl/qgc_asl,RedoXyde/PX4_qGCS,mihadyuk/qgroundcontrol,mihadyuk/qgroundcontrol,kd0aij/qgroundcontrol,mihadyuk/qgroundcontrol,catch-twenty-two/qgroundcontrol,scott-eddy/qgroundcontrol,remspoor/qgroundcontrol,cfelipesouza/qgroundcontrol,mihadyuk/qgroundcontrol,Hunter522/qgroundcontrol,catch-twenty-two/qgroundcontrol,Hunter522/qgroundcontrol,scott-eddy/qgroundcontrol,RedoXyde/PX4_qGCS,CornerOfSkyline/qgroundcontrol,CornerOfSkyline/qgroundcontrol,scott-eddy/qgroundcontrol,cfelipesouza/qgroundcontrol,scott-eddy/qgroundcontrol,catch-twenty-two/qgroundcontrol,CornerOfSkyline/qgroundcontrol,RedoXyde/PX4_qGCS,kd0aij/qgroundcontrol,RedoXyde/PX4_qGCS,cfelipesouza/qgroundcontrol,cfelipesouza/qgroundcontrol,remspoor/qgroundcontrol,kd0aij/qgroundcontrol,ethz-asl/qgc_asl,catch-twenty-two/qgroundcontrol,mihadyuk/qgroundcontrol,ethz-asl/qgc_asl,kd0aij/qgroundcontrol,kd0aij/qgroundcontrol,kd0aij/qgroundcontrol,RedoXyde/PX4_qGCS,remspoor/qgroundcontrol,CornerOfSkyline/qgroundcontrol,remspoor/qgroundcontrol,Hunter522/qgroundcontrol,cfelipesouza/qgroundcontrol,catch-twenty-two/qgroundcontrol,RedoXyde/PX4_qGCS,CornerOfSkyline/qgroundcontrol,mihadyuk/qgroundcontrol,ethz-asl/qgc_asl,remspoor/qgroundcontrol