From 121bcf5c279520f06fcf453ab65ef26a62d21c13 Mon Sep 17 00:00:00 2001
From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr>
Date: Wed, 11 Oct 2017 11:15:55 +0200
Subject: [PATCH] Resolving null pointer exception

---
 plugins/howto                                       | 6 ++++--
 src/main/java/ui/window/JDialogCCodeGeneration.java | 5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/plugins/howto b/plugins/howto
index b0ab6141ec..5d3cfae67b 100644
--- a/plugins/howto
+++ b/plugins/howto
@@ -4,7 +4,9 @@ $cd testPluginCodeGeneration
 $make
 
 Then, edit the configuration file of TTool (default: TTool/bin/config.xml) and add:
-<PLUGIN_JAVA_CODE_GENERATOR data="../plugins/CustomizerAvatarCodeGeneration.jar" />
+<PLUGIN_PATH data="../plugins" />
+<PLUGIN file="CustomizerAvatarJavaCodeGeneration.jar" package = "."/>
+PLUGIN file="CustomizerGraphicalComponent.jar" package="."/>
 
 Then, start TTool, and generate Java code from an avatar design model.
 
@@ -14,7 +16,7 @@ Then, start TTool, and generate Java code from an avatar design model.
 
 2) Add the plugin reference in config.xml
 For example:
-<PLUGIN_JAVA_CODE_GENERATOR data="../plugins/CustomizerAvatarCodeGeneration.jar" />
+<PLUGIN file data="../plugins/CustomizerAvatarCodeGeneration.jar" />
 
 3) Load the configuration information in ConfigurationTTool.java
 
diff --git a/src/main/java/ui/window/JDialogCCodeGeneration.java b/src/main/java/ui/window/JDialogCCodeGeneration.java
index 85cf2be607..6bd1a75aff 100755
--- a/src/main/java/ui/window/JDialogCCodeGeneration.java
+++ b/src/main/java/ui/window/JDialogCCodeGeneration.java
@@ -346,8 +346,11 @@ public class JDialogCCodeGeneration extends JDialog implements ActionListener, R
     //    }
 
     public void stopProcess() {
+	
         try {
-            rshc.stopCommand();
+	    if (rshc != null) {
+		rshc.stopCommand();
+	    }
         } catch (LauncherException le) {
 
         }
-- 
GitLab