Skip to content

Commit 2d5eb25

Browse files
committed
npe in NewControllerAction on non bundle context Haehnchen#378
1 parent a84ea60 commit 2d5eb25

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/fr/adrienbrault/idea/symfony2plugin/action/NewControllerAction.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,10 @@ public static void buildFile(AnActionEvent event, final Project project, String
104104

105105
if(symfonyBundle != null) {
106106
bundleName = StringUtils.strip(symfonyBundle.getNamespaceName(), "\\");
107-
}
108-
109-
String path = symfonyBundle.getRelative(initialBaseDir.getVirtualFile());
110-
if(path != null) {
111-
bundleName = bundleName.concat("\\" + path);
107+
String path = symfonyBundle.getRelative(initialBaseDir.getVirtualFile());
108+
if(path != null) {
109+
bundleName = bundleName.concat("\\" + path);
110+
}
112111
}
113112

114113
content = content.replace("{{ Namespace }}", bundleName).replace("{{ ControllerName }}", fileName);

0 commit comments

Comments
 (0)