private boolean checkForUnsavedPrograms() {
		// first check the current program as that is the one most likely to have changes
		Program currentProgram = getCurrentProgram();
		if (currentProgram != null && currentProgram.isChanged()) {
			return true;
		}
		// look at all the open programs to see if any have changes
		for (ProgramInfo programInfo : programMap.values()) {
			if (programInfo.program.isChanged()) {
				return true;
			}
		}
		return false;

	}
Returns true if there is at least one program that has unsaved changes.
@return true if there is at least one program that has unsaved changes.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/progmgr/MultiProgramManager.java