bugfix: possible to append to null message lsit

This commit is contained in:
fros4943 2006-09-07 11:03:37 +00:00
parent 2edf36f4cf
commit 3af7e79333

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ContikiMoteTypeDialog.java,v 1.9 2006/09/06 12:26:33 fros4943 Exp $
* $Id: ContikiMoteTypeDialog.java,v 1.10 2006/09/07 11:03:37 fros4943 Exp $
*/
package se.sics.cooja.contikimote;
@ -1172,23 +1172,27 @@ public class ContikiMoteTypeDialog extends JDialog {
// Recheck that contiki path exists
if (!contikiDir.exists()) {
if (appender != null)
appender.addMessage("Bad Contiki OS path", MessageList.ERROR);
logger.fatal("Contiki path does not exist");
return false;
}
if (!contikiDir.isDirectory()) {
if (appender != null)
appender.addMessage("Bad Contiki OS path", MessageList.ERROR);
logger.fatal("Contiki path is not a directory");
return false;
}
if (libFile.exists()) {
if (appender != null)
appender.addMessage("Bad output filenames", MessageList.ERROR);
logger.fatal("Could not overwrite already existing library");
return false;
}
if (CoreComm.hasLibraryFileBeenLoaded(libFile)) {
if (appender != null)
appender.addMessage("Bad output filenames", MessageList.ERROR);
logger
.fatal("A library has already been loaded with the same name before");
@ -1196,12 +1200,14 @@ public class ContikiMoteTypeDialog extends JDialog {
}
if (depFile.exists()) {
if (appender != null)
appender.addMessage("Bad output filenames", MessageList.ERROR);
logger.fatal("Could not overwrite already existing dependency file");
return false;
}
if (mapFile.exists()) {
if (appender != null)
appender.addMessage("Bad output filenames", MessageList.ERROR);
logger.fatal("Could not overwrite already existing map file");
return false;