16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 07:59:18 +02:00

view range factor implementation

This commit is contained in:
tmj-fstate
2017-03-08 01:25:09 +01:00
parent 2f3e916d9e
commit 6526620364
8 changed files with 56 additions and 81 deletions

View File

@@ -275,6 +275,12 @@ opengl_texture::load_DDS() {
--mapcount;
}
*/
if( datasize == 0 ) {
// catch malformed .dds files
WriteLog( "File \"" + name + "\" is malformed and holds no texture data." );
data_state = resource_state::failed;
return;
}
// reserve space and load texture data
data.resize( datasize );
if( offset != 0 ) {