fixed crash on startup if no db
use pthread_mutex to avoid cocurrent access on a device
Merge branch 'master' of https://github.com/babelouest/angharad