Skip to content
Snippets Groups Projects
Commit d19b375a authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fix null handling if no project is open in web api

parent 2706700e
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,10 @@ class ProjectCurrentMethod extends MethodExecutable { ...@@ -11,6 +11,10 @@ class ProjectCurrentMethod extends MethodExecutable {
override def execute(session: Session, message: Message): JsonObject = { override def execute(session: Session, message: Message): JsonObject = {
val currentProject = PlayPadPlugin.getInstance().getCurrentProject val currentProject = PlayPadPlugin.getInstance().getCurrentProject
if (currentProject == null) {
new JsonObject
} else {
ProjectSerializer.serializeProject(currentProject) ProjectSerializer.serializeProject(currentProject)
} }
} }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment