Permalink
Browse files

bail out more quickly when failing to load textures

  • Loading branch information...
rtv committed Dec 2, 2011
1 parent 6b07669 commit a942d14f98d3ff9cbc4b2c3a083c1c1e791c2a80
Showing with 5 additions and 3 deletions.
  1. +5 −3 libstage/texture_manager.cc
@@ -7,19 +7,21 @@
*/
#include <sstream>
-
#include "texture_manager.hh"
#include "file_manager.hh"
using namespace Stg;
GLuint TextureManager::loadTexture( const char *filename )
{
+// if( filename == NULL )
+ // return 0;
+
GLuint texName;
Fl_Shared_Image *img = Fl_Shared_Image::get( filename );
- if( img == NULL ) {
+ if( img == NULL) {
fprintf( stderr, "unable to open image: %s\n", filename );
- exit(-1);
+ //exit(-1);
return 0;
}

0 comments on commit a942d14

Please sign in to comment.