Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-24 19:37:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-24 19:37:50 +0400
commit58c51bb551fbc573f3e570b9365ac309568973be (patch)
tree95a9e57ee23edaab7c78a2ea75d135e01ada7263 /source/blender/editors/space_text
parent925234f1e07fd445d67dd0ca3fb66a11e4a5c164 (diff)
quiet some warnings & (possible/unlikely error)
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 29583a9356e..5517f428678 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -2412,7 +2412,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
{
Text *text = st->text;
int max = wrap_width(st, ar); /* view */
- int charp; /* mem */
+ int charp = -1; /* mem */
int loop = 1, found = 0; /* flags */
char ch;
@@ -2513,9 +2513,11 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
y--;
}
-
- if(sel) { text->sell = linep; text->selc = charp; }
- else { text->curl = linep; text->curc = charp; }
+
+ if (linep && charp != -1) {
+ if(sel) { text->sell = linep; text->selc = charp; }
+ else { text->curl = linep; text->curc = charp; }
+ }
}
static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel)