aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--search.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/search.c b/search.c
index ae74284..5b5ddaf 100644
--- a/search.c
+++ b/search.c
@@ -14,6 +14,10 @@ forwardSearch(Buffer * buf, char *str)
return FALSE;
}
l = begin = buf->currentLine;
+ if (l == NULL) {
+ disp_message("Not found", FALSE);
+ return FALSE;
+ }
pos = buf->pos + 1;
#ifdef JP_CHARSET
if (l->propBuf[pos] & PC_KANJI2)
@@ -78,6 +82,10 @@ backwardSearch(Buffer * buf, char *str)
return FALSE;
}
l = begin = buf->currentLine;
+ if (l == NULL) {
+ disp_message("Not found", FALSE);
+ return FALSE;
+ }
if (buf->pos > 0) {
pos = buf->pos - 1;
#ifdef JP_CHARSET