summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-03-25 12:59:13 +0000
committerAndy Williams <andy@andywilliams.me>2017-03-25 12:59:13 +0000
commitd15faf08fe3dcf0ef5ad7f8ab5195cb57a631d87 (patch)
tree8951a45e46edc81ce0136e62c6d79be693475eea
parent67e07e5d2d572957fa8a16c662b22baa39d7b643 (diff)
elm_code: fix CID 1368489
@fix
-rw-r--r--src/lib/elementary/elm_code_widget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index f5cb42262a..9a5b993106 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1655,13 +1655,13 @@ _elm_code_widget_key_down_cb(void *data, Evas *evas EINA_UNUSED,
1655 if (!pd->selection) 1655 if (!pd->selection)
1656 elm_code_widget_selection_start(widget, pd->cursor_line, pd->cursor_col - (backwards?1:0)); 1656 elm_code_widget_selection_start(widget, pd->cursor_line, pd->cursor_col - (backwards?1:0));
1657 1657
1658 if (pd->selection->start_line == pd->selection->end_line) 1658 if (pd->selection && pd->selection->start_line == pd->selection->end_line)
1659 { 1659 {
1660 if ((pd->selection->end_col == pd->selection->start_col && !backwards) || 1660 if ((pd->selection->end_col == pd->selection->start_col && !backwards) ||
1661 (pd->selection->end_col > pd->selection->start_col)) 1661 (pd->selection->end_col > pd->selection->start_col))
1662 elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1); 1662 elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1);
1663 } 1663 }
1664 else if (pd->selection->end_line > pd->selection->start_line) 1664 else if (pd->selection && pd->selection->end_line > pd->selection->start_line)
1665 { 1665 {
1666 elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1); 1666 elm_code_widget_cursor_position_set(widget, pd->selection->end_line, pd->selection->end_col+1);
1667 } 1667 }