Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Unified Diff: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java

Issue 10012048: fix for NPE if invalid resource (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java (revision 6281)
+++ editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartServerLaunchConfigurationDelegate.java (working copy)
@@ -170,7 +170,9 @@
IResource resource = launchConfig.getApplicationResource();
if (resource == null) {
- return launchConfig.getProject().getLocation().toFile();
+ if (launchConfig.getProject() != null) {
+ return launchConfig.getProject().getLocation().toFile();
+ }
devoncarew 2012/04/06 18:47:27 up to an else clause here?
} else {
if (resource.isLinked()) {
// If the resource is linked, set the cwd to the parent directory of the resolved resource.
@@ -180,6 +182,7 @@
return resource.getProject().getLocation().toFile();
}
}
+ return null;
devoncarew 2012/04/06 18:47:27 Can you move this return
}
private String translateToFilePath(String scriptPath) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698