if (desktop.getSelectedFrame() == null) {
if (JSLDesktop.getSelectedFrame() == null) {
        public void actionPerformed(ActionEvent e) {            CompatibleFileDialog fc2 = new CompatibleFileDialog();            FileFilter type1 = new ExtensionFilter("Sysex Files (*.syx)", ".syx");	    // core.ImportMidiFile extracts Sysex Messages from MidiFile            FileFilter type2 = new ExtensionFilter("MIDI Files (*.mid)" , ".mid");            fc2.addChoosableFileFilter(type1);            fc2.addChoosableFileFilter(type2);            fc2.setFileFilter(type1);            fc2.setCurrentDirectory(new File(appConfig.getSysexPath()));            if (fc2.showOpenDialog(PatchEdit.getInstance()) != JFileChooser.APPROVE_OPTION)		return;	    File file = fc2.getSelectedFile();	    try {		if (desktop.getSelectedFrame() == null) {		    ErrorMsg.reportError("Error", "Library to Import Patch\n into Must be in Focus");		} else		    ((PatchBasket) desktop.getSelectedFrame()).ImportPatch(file);	    } catch (IOException ex) {		ErrorMsg.reportError("Error", "Unable to Load Sysex Data", ex);	    }	}