X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgraphics%2Fimageloader.cpp;h=fa6fcf802b2a57eb6d852e34c6363d375e521ba4;hb=054fca09f0bbd64fdbd6406a0643de938a9cd4fb;hp=2c6ce217381f4dcbf1f33bec50104eeee6c1987c;hpb=2ebdf45974a0a7649b3488f9da4b8cf90a1db584;p=libs%2Fgui.git diff --git a/source/graphics/imageloader.cpp b/source/graphics/imageloader.cpp index 2c6ce21..fa6fcf8 100644 --- a/source/graphics/imageloader.cpp +++ b/source/graphics/imageloader.cpp @@ -89,10 +89,21 @@ void ImageLoader::load(Image::Data &data) if(state>=FINISHED) throw logic_error("already loaded"); - load_(data); + if(state=HEADERS_LOADED) + throw logic_error("headers already loaded"); + + load_headers_(data); + state = HEADERS_LOADED; +} + ImageLoader::Registry &ImageLoader::get_registry() { static Registry registry;