@@ -292,7 +292,7 @@ private void checkIfPluginHostHasPermissionRunCommand() {
292292 }
293293
294294 private void processExecutablePath (String executable ) {
295- if (mExecutablePathText == null ) return ;
295+ if (mExecutablePathText == null || mExecutablePathText . getWindowToken () == null ) return ;
296296
297297 boolean validate = true ;
298298 boolean executableDefined = true ;
@@ -417,12 +417,12 @@ else if (executablePathText.startsWith("$PREFIX/") || executablePathText.startsW
417417 executableFileNamesAdaptor .clear ();
418418 executableFileNamesAdaptor .addAll (new ArrayList <>(Arrays .asList (executableFileNamesList )));
419419 executableFileNamesAdaptor .notifyDataSetChanged ();
420- if (mExecutablePathText .isFocused ())
420+ if (mExecutablePathText .isFocused () && mExecutablePathText . getWindowToken () != null )
421421 mExecutablePathText .showDropDown ();
422422 }
423423
424424 private void processWorkingDirectoryPath (String workingDirectory ) {
425- if (mWorkingDirectoryPathText == null ) return ;
425+ if (mWorkingDirectoryPathText == null || mWorkingDirectoryPathText . getWindowToken () == null ) return ;
426426
427427 boolean validate = true ;
428428 boolean workingDirectoryDefined = true ;
@@ -537,7 +537,7 @@ else if (workingDirectoryPathText.startsWith("$PREFIX/") || workingDirectoryPath
537537 workingDirectoriesNamesAdaptor .clear ();
538538 workingDirectoriesNamesAdaptor .addAll (new ArrayList <>(Arrays .asList (workingDirectoriesNamesList )));
539539 workingDirectoriesNamesAdaptor .notifyDataSetChanged ();
540- if (mWorkingDirectoryPathText .isFocused ())
540+ if (mWorkingDirectoryPathText .isFocused () && mWorkingDirectoryPathText . getWindowToken () != null )
541541 mWorkingDirectoryPathText .showDropDown ();
542542 }
543543
0 commit comments