wiasane: Fixed possible null-pointer dereferences