Fixed crash in previous commit when track preview is drawing for missed frame
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 9 Jun 2012 11:34:22 +0000 (11:34 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 9 Jun 2012 11:34:22 +0000 (11:34 +0000)
source/blender/blenkernel/intern/tracking.c
source/blender/editors/interface/interface_draw.c

index 1d4ed2c8c40cc02f3e72cd8a0452e44ca030a1b7..938bff814703e9774512da2876d160fd305ce788 100644 (file)
@@ -1246,7 +1246,7 @@ static void disable_imbuf_channels(ImBuf *ibuf, MovieTrackingTrack *track, int g
 
 ImBuf *BKE_tracking_sample_pattern_imbuf(int frame_width, int frame_height,
                                          ImBuf *search_ibuf, MovieTrackingMarker *marker,
-                                                                                int num_samples_x, int num_samples_y, float pos[2])
+                                         int num_samples_x, int num_samples_y, float pos[2])
 {
        ImBuf *pattern_ibuf;
        double src_pixel_x[5], src_pixel_y[5];
index d652fe4a56964804fa9cea2d1ab8109de0f56c4c..6f6de0cc418eb390d8b6a59a733d8a3ef8f4baf2 100644 (file)
@@ -1513,8 +1513,9 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
 
                ok = 1;
        }
-       else if ((!scopes->track_preview) ||
-             (scopes->track_preview->x != width || scopes->track_preview->y != height))
+       else if ((scopes->track_search) &&
+                ((!scopes->track_preview) ||
+                (scopes->track_preview->x != width || scopes->track_preview->y != height)))
        {
                ImBuf *tmpibuf;