@Override
	public boolean isValid(Program p) {
		if (!super.isValid(p)) {
			return false;
		}

		Listing listing = p.getListing();
		if (!addr.equals(functionAddr)) {
			// ensure that inferred function reference is valid
			if (listing.getFunctionAt(addr) != null) {
				return false;
			}
			CodeUnit cu = listing.getCodeUnitAt(addr);
			if (!(cu instanceof Data)) {
				return false;
			}
			Data data = (Data) cu;
			if (!(data.getDataType() instanceof Pointer)) {
				return false;
			}
			Reference ref = data.getPrimaryReference(0);
			if (ref == null || !ref.getToAddress().equals(functionAddr)) {
				return false;
			}
		}

		return listing.getFunctionAt(functionAddr) != null;

	}
Restore this function location using the given program and save state object.

@param program1 the program containing the function location
@param obj the save state object for saving the location
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/FunctionLocation.java