Prevent null pointer dereference

Change-Id: Ia197152f6ece37dd2dd2ce1b41c1dfd1a985781c
Prevent null pointer dereference

(even though the null pointer dereference in SwSection::GetBaseLink would be
somewhat harmless in this case, as the result is here immediately turned into a
pointer again; but it also does not look like LinkManager::Remove is designed to
be called with a null pointer argument)

Change-Id: Ia1560b03be6a654c1207c146c873f29788b68558
Catch illegal null pointer dereferences early

Change-Id: I4d558e9a6e2c4e4d9feb45eb5a3fd01ee322bef8