bugfix: possible to append to null message lsit
This commit is contained in:
parent
2edf36f4cf
commit
3af7e79333
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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;
|
package se.sics.cooja.contikimote;
|
||||||
|
@ -1172,37 +1172,43 @@ public class ContikiMoteTypeDialog extends JDialog {
|
||||||
|
|
||||||
// Recheck that contiki path exists
|
// Recheck that contiki path exists
|
||||||
if (!contikiDir.exists()) {
|
if (!contikiDir.exists()) {
|
||||||
appender.addMessage("Bad Contiki OS path", MessageList.ERROR);
|
if (appender != null)
|
||||||
|
appender.addMessage("Bad Contiki OS path", MessageList.ERROR);
|
||||||
logger.fatal("Contiki path does not exist");
|
logger.fatal("Contiki path does not exist");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!contikiDir.isDirectory()) {
|
if (!contikiDir.isDirectory()) {
|
||||||
appender.addMessage("Bad Contiki OS path", MessageList.ERROR);
|
if (appender != null)
|
||||||
|
appender.addMessage("Bad Contiki OS path", MessageList.ERROR);
|
||||||
logger.fatal("Contiki path is not a directory");
|
logger.fatal("Contiki path is not a directory");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libFile.exists()) {
|
if (libFile.exists()) {
|
||||||
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
if (appender != null)
|
||||||
|
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
||||||
logger.fatal("Could not overwrite already existing library");
|
logger.fatal("Could not overwrite already existing library");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CoreComm.hasLibraryFileBeenLoaded(libFile)) {
|
if (CoreComm.hasLibraryFileBeenLoaded(libFile)) {
|
||||||
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
if (appender != null)
|
||||||
|
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
||||||
logger
|
logger
|
||||||
.fatal("A library has already been loaded with the same name before");
|
.fatal("A library has already been loaded with the same name before");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depFile.exists()) {
|
if (depFile.exists()) {
|
||||||
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
if (appender != null)
|
||||||
|
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
||||||
logger.fatal("Could not overwrite already existing dependency file");
|
logger.fatal("Could not overwrite already existing dependency file");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapFile.exists()) {
|
if (mapFile.exists()) {
|
||||||
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
if (appender != null)
|
||||||
|
appender.addMessage("Bad output filenames", MessageList.ERROR);
|
||||||
logger.fatal("Could not overwrite already existing map file");
|
logger.fatal("Could not overwrite already existing map file");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue