debugger: Avoid NULL-pointer deref

Change-Id: I25e25ea801c857b7995029bba3963d7d9d73827a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>