quiet some warnings & (possible/unlikely error)
authorCampbell Barton <ideasman42@gmail.com>
Tue, 24 Jan 2012 15:37:50 +0000 (15:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 24 Jan 2012 15:37:50 +0000 (15:37 +0000)
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/uvedit/uvedit_smart_stitch.c

index 29583a9356eb39abb06784331a76ea3f2b715c89..5517f428678e3214be169818ef71b96efb75a16e 100644 (file)
@@ -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)
index 65ef3273e30d016a3f395e9d9c2a6e93f4b0f29e..bf1b1ddc18aaa0b56b93339c31505577cbc08da7 100644 (file)
@@ -193,6 +193,10 @@ static void time_draw_cache(SpaceTime *stime, Object *ob)
                                col[0] = 1.0;   col[1] = 0.1;   col[2] = 0.75;
                                col[3] = 0.1;
                                break;
+                       default:
+                               BLI_assert(0);
+                               col[0] = 1.0;   col[1] = 0.0;   col[2] = 1.0;
+                               col[3] = 0.1;
                }
                glColor4fv(col);
                
index b2a9b6bb57200cae95c86a1bd7aef1d8ca6a40c3..c012a23c175b50a5a028d14ad707178a88ce5bf9 100644 (file)
@@ -565,7 +565,7 @@ static void stitch_validate_stichability(UvElement *element, StitchState *state,
 static int stitch_process_data(StitchState *state, Scene *scene, int final)
 {
        int i;
-       StitchPreviewer *preview = uv_get_stitch_previewer();
+       StitchPreviewer *preview;
        IslandStitchData *island_stitch_data = NULL;
        int previous_island = state->static_island;
        EditFace *efa;