File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,16 @@ public void onQPyExec(View v) {
91
91
@ Override
92
92
protected void onActivityResult (int requestCode , int resultCode , Intent data ) {
93
93
if (requestCode == SCRIPT_EXEC_PY ) {
94
- Bundle bundle = data .getExtras ();
95
- String flag = bundle .getString ("flag" ); // flag you set
96
- String param = bundle .getString ("param" ); // param you set
97
- String result = bundle .getString ("result" ); // Result your Pycode generate
98
- Toast .makeText (this , "onQPyExec: return (" +result +")" , Toast .LENGTH_SHORT ).show ();
94
+ if (data !=null ) {
95
+ Bundle bundle = data .getExtras ();
96
+ String flag = bundle .getString ("flag" ); // flag you set
97
+ String param = bundle .getString ("param" ); // param you set
98
+ String result = bundle .getString ("result" ); // Result your Pycode generate
99
+ Toast .makeText (this , "onQPyExec: return (" +result +")" , Toast .LENGTH_SHORT ).show ();
100
+ } else {
101
+ Toast .makeText (this , "onQPyExec: data is null" , Toast .LENGTH_SHORT ).show ();
102
+
103
+ }
99
104
}
100
105
}
101
106
You can’t perform that action at this time.
0 commit comments