mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-2269: Preventing AWTError when checking Taskbar.isTaskbarSupported()
This commit is contained in:
parent
db3ced7f96
commit
6845463e06
3 changed files with 8 additions and 11 deletions
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package ghidra;
|
||||
|
||||
import java.awt.AWTError;
|
||||
import java.awt.Taskbar;
|
||||
|
||||
/**
|
||||
|
@ -41,9 +42,13 @@ public class Ghidra {
|
|||
// fully qualified class name (with . replaced by -). If we don't do this here, the next
|
||||
// time it gets done is in a new thread, which results in the application name being set to
|
||||
// "java-lang-thread".
|
||||
if (!Boolean.getBoolean("java.awt.headless")) {
|
||||
try {
|
||||
Taskbar.isTaskbarSupported();
|
||||
}
|
||||
catch (AWTError e) {
|
||||
// This can happen if we are running in a headless environment. We don't need to
|
||||
// worry about setting the application name in this case.
|
||||
}
|
||||
|
||||
// Forward args to GhidraLauncher, which will perform the launch
|
||||
GhidraLauncher.launch(args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue