Commit 705db6ae authored by Christopher Tenter's avatar Christopher Tenter

fix loading of material files in obj importer

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21106 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 97a03f6b
......@@ -185,10 +185,16 @@ bool FileOBJPlugin::readMaterial(QString _filename, OBJImporter& _importer)
//open stream
QTextStream matStream( &_filename, QIODevice::ReadOnly );
QFile matFile(_filename);
if (!matFile.open(QFile::ReadOnly))
{
emit log(LOGERR, tr("readMaterial : cannot open file %1").arg(_filename));
return false;
}
QTextStream matStream(&matFile);
if ( !matStream.status()==QTextStream::Ok ){
emit log(LOGERR, tr("readMaterial : cannot open file %1").arg(_filename) );
emit log(LOGERR, tr("readMaterial : cannot open stream %1").arg(_filename) );
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment