Tracking: Show plane track outline if image failed to load

This commit is contained in:
Sergey Sharybin 2015-04-22 23:20:00 +05:00
parent f35489fa94
commit 147d0cdf98
Notes: blender-bot 2023-02-14 09:36:46 +01:00
Referenced by issue #44473, Blender crashes immediately after opening a saved file an klicking on a corner of a plane track
1 changed files with 3 additions and 1 deletions

View File

@ -1123,7 +1123,9 @@ static void draw_plane_marker_ex(SpaceClip *sc, Scene *scene, MovieTrackingPlane
{
bool tiny = (sc->flag & SC_SHOW_TINY_MARKER) != 0;
bool is_selected_track = (plane_track->flag & SELECT) != 0;
bool draw_plane_quad = plane_track->image == NULL || plane_track->image_opacity == 0.0f;
const bool has_image = plane_track->image != NULL &&
BKE_image_has_ibuf(plane_track->image, NULL);
const bool draw_plane_quad = !has_image || plane_track->image_opacity == 0.0f;
float px[2];
if (draw_outline) {