Fix segfault when no credentials available.