[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/games/astrododge/src
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2009-07-30 16:04:37
Message-ID: 1248969877.736349.14631.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1004622 by rivol:

Abort loading when a model's texture cannot be loaded.

 M  +5 -1      datastore.cpp  


--- trunk/playground/games/astrododge/src/datastore.cpp #1004621:1004622
@@ -139,7 +139,11 @@
             kError() << "Invalid texture key" << texkey;
             continue;
         }
-        model->setTexture(texnum, texture(modelconf.readEntry(texkey)));
+        Texture* tex = texture(modelconf.readEntry(texkey));
+        if (!tex) {
+            return false;
+        }
+        model->setTexture(texnum, tex);
     }
     mNonFinalizedModels[name] = model;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic