Skip to content

Commit

Permalink
fix: prevent #40
Browse files Browse the repository at this point in the history
  • Loading branch information
Azn9 committed Nov 30, 2023
1 parent e23d860 commit 5e01b10
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ class DataService {

val editor: FileEditor? = project?.let {
invokeOnEventThread {
FileEditorManager.getInstance(project)?.selectedEditor
try {
FileEditorManager.getInstance(project)?.selectedEditor
} catch (e: Throwable) {
DiscordPlugin.LOG.warn("Error getting selected editor", e)
null
}
}
}

Expand Down

0 comments on commit 5e01b10

Please sign in to comment.