Skip to content

Commit

Permalink
handling issue #88
Browse files Browse the repository at this point in the history
  • Loading branch information
javatlacati authored and Phosphorus15 committed Jan 23, 2023
1 parent c13f6c5 commit 5eb2799
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class PrologSimpleRunConfigurationProducer extends LazyRunConfigurationProducer[

override def setupConfigurationFromContext(t: PrologRunConfiguration, configurationContext: ConfigurationContext, ref: Ref[PsiElement]): Boolean = {
val file = getVirtualFile(configurationContext)
if (file.isEmpty || file.get.getFileType != PrologFileType.INSTANCE) {
val fileType = file.map(_.getFileType)
if (file.isEmpty || fileType.isEmpty || fileType.get != PrologFileType.INSTANCE) {
return false
}
file.foreach(file => {
Expand Down

0 comments on commit 5eb2799

Please sign in to comment.