Skip to content

Commit e67b6c6

Browse files
authored
Merge pull request #122 from jimfoye/patch-2
Add null check in OnIndentSelection()
2 parents 9625d54 + b139e39 commit e67b6c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ICSharpCode.AvalonEdit/Editing/EditingCommandHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static string InvertCase(string text)
641641
static void OnIndentSelection(object target, ExecutedRoutedEventArgs args)
642642
{
643643
TextArea textArea = GetTextArea(target);
644-
if (textArea != null && textArea.Document != null) {
644+
if (textArea != null && textArea.Document != null && textArea.IndentationStrategy != null) {
645645
using (textArea.Document.RunUpdate()) {
646646
int start, end;
647647
if (textArea.Selection.IsEmpty) {

0 commit comments

Comments
 (0)