texturev: Fixed crash when selected image is invalid.
This commit is contained in:
parent
6848926552
commit
b0a7c13473
@ -1670,7 +1670,11 @@ int _main_(int _argc, char** _argv)
|
||||
, &orientation
|
||||
);
|
||||
|
||||
view.m_inLinear = bimg::isFloat(bimg::TextureFormat::Enum(view.m_textureInfo.format) );
|
||||
bimg::TextureFormat::Enum format = bimg::TextureFormat::Enum(view.m_textureInfo.format);
|
||||
|
||||
if (format < bimg::TextureFormat::Count)
|
||||
{
|
||||
view.m_inLinear = bimg::isFloat(format);
|
||||
|
||||
switch (orientation)
|
||||
{
|
||||
@ -1684,6 +1688,7 @@ int _main_(int _argc, char** _argv)
|
||||
case bimg::Orientation::HFlipR270: cmdExec("view orientation\nview orientation z -270\nview orientation x -180"); break;
|
||||
case bimg::Orientation::VFlip: cmdExec("view orientation\nview orientation y -180"); break;
|
||||
}
|
||||
}
|
||||
|
||||
std::string title;
|
||||
if (isValid(texture) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user