From a7e185690ea4ea5cb9cacca450ab2ac0bdb9812f Mon Sep 17 00:00:00 2001 From: DjBushido Date: Thu, 5 Jun 2014 21:29:00 -0400 Subject: [PATCH] Try once more to fix the NPE on tests. --- .../main/java/org/bspeice/minimalbible/MinimalBible.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MinimalBible/src/main/java/org/bspeice/minimalbible/MinimalBible.java b/MinimalBible/src/main/java/org/bspeice/minimalbible/MinimalBible.java index d85c32c..90ee797 100644 --- a/MinimalBible/src/main/java/org/bspeice/minimalbible/MinimalBible.java +++ b/MinimalBible/src/main/java/org/bspeice/minimalbible/MinimalBible.java @@ -58,11 +58,13 @@ public class MinimalBible extends Application { * @param o The object to be injected */ public void inject(Object o) { + getObjGraph().inject(o); + } + + public ObjectGraph getObjGraph() { if (graph == null) { graph = ObjectGraph.create(MinimalBibleModules.class); } - graph.inject(o); + return graph; } - - public ObjectGraph getObjGraph() { return graph; } }