]> git.tdb.fi Git - libs/gl.git/blobdiff - source/font.cpp
Get all blocks for the program before applying them
[libs/gl.git] / source / font.cpp
index 88780331fd10b8144dd6f9cbbce562df4c191634..c96ec7507aeee520962acf37fcdb2c4a997f4a17 100644 (file)
@@ -26,7 +26,7 @@ void Font::set_texture(const Texture2D &t)
 const Texture2D &Font::get_texture() const
 {
        if(!texture)
-               throw InvalidState("No texture");
+               throw logic_error("No texture");
        return *texture;
 }
 
@@ -145,7 +145,7 @@ void Font::Loader::texture()
 
 void Font::Loader::texture_ref(const string &name)
 {
-       obj.texture = get_collection().get<Texture2D>(name);
+       obj.texture = &get_collection().get<Texture2D>(name);
        obj.texture.keep();
 }