Revision: 3897
Author: [email protected]
Date: Tue Aug 17 10:13:50 2010
Log: Fixed an NPE for DBTree's dbcsAlreadyExists method. If the pl.ini gets
recreated, but a project still contains database snapshots that could refer
to missing connections, the check could run into a null data source.
http://code.google.com/p/power-architect/source/detail?r=3897
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java
=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java Fri Aug
13 09:24:17 2010
+++ /trunk/src/main/java/ca/sqlpower/architect/swingui/DBTree.java Tue Aug
17 10:13:50 2010
@@ -228,7 +228,7 @@
boolean found = false;
while (it.hasNext() && found == false) {
SPDataSource dbcs = it.next().getDataSource();
- if (dbcs.equals(spec)) {
+ if (dbcs != null && dbcs.equals(spec)) {
found = true;
}
}