loco: Fix error handling. Fixes null pointer dereference / http://www.google-melange.com/gci/task/view/google/gci2011/7120335
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>