diff options
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/me/laria/code/idea_caseconv/SelectionReplacerAction.java | 6 | ||||
-rw-r--r-- | src/main/resources/META-INF/plugin.xml | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle index 20b4f62..0287fed 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'me.laria.code' -version '0.7.0' +version '0.7.1' sourceCompatibility = 1.8 diff --git a/src/main/java/me/laria/code/idea_caseconv/SelectionReplacerAction.java b/src/main/java/me/laria/code/idea_caseconv/SelectionReplacerAction.java index 088a1e2..d715ac2 100644 --- a/src/main/java/me/laria/code/idea_caseconv/SelectionReplacerAction.java +++ b/src/main/java/me/laria/code/idea_caseconv/SelectionReplacerAction.java @@ -33,8 +33,10 @@ abstract class SelectionReplacerAction extends AnAction { public void actionPerformed(AnActionEvent anActionEvent) { Editor editor = anActionEvent.getData(CommonDataKeys.EDITOR); Project project = anActionEvent.getData(CommonDataKeys.PROJECT); - assert editor != null; - assert project != null; + + if (editor == null || project == null) { + return; + } CaretModel caretModel = editor.getCaretModel(); Document document = editor.getDocument(); diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 13e9403..5ce044e 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ <idea-plugin> <id>me.laria.code.idea_caseconv</id> <name>Case conversion</name> - <version>0.7.0</version> + <version>0.7.1</version> <vendor email="laria@laria.me" url="https://code.laria.me">Laria Chabowski</vendor> <description><![CDATA[<html> @@ -39,6 +39,9 @@ <change-notes><![CDATA[<html> <dl> + <dt>Version 0.7.1</dt> + <dd>Fix crashing when an action is performed without a focussed editor</dd> + <dt>Version 0.7.0</dt> <dd>Add setting for newline mode and fix converting *from* dot.case</dd> |