Fix for crash with UV unwrap without an image window open. It really

shouldn't be using the image window but for now this fixes the crash.
This commit is contained in:
Brecht Van Lommel 2008-03-30 17:54:06 +00:00
parent 8c3c1c4a0b
commit e433465fc6

@ -218,12 +218,18 @@ void transform_aspect_ratio_tface_uv(float *aspx, float *aspy)
{
int w, h;
float xuser_asp, yuser_asp;
aspect_sima(G.sima, &xuser_asp, &yuser_asp);
transform_width_height_tface_uv(&w, &h);
*aspx= (float)w/256.0f * xuser_asp;
*aspy= (float)h/256.0f * yuser_asp;
if(G.sima) {
aspect_sima(G.sima, &xuser_asp, &yuser_asp);
transform_width_height_tface_uv(&w, &h);
*aspx= (float)w/256.0f * xuser_asp;
*aspy= (float)h/256.0f * yuser_asp;
}
else {
*aspx= 1.0f;
*aspy= 1.0f;
}
}
void transform_width_height_tface_uv(int *width, int *height)