X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fvslider.cpp;h=1145b97c3c762e67dfec564997baa6d6a0114e16;hb=43a75e4e9be56c58be5e224f19016bb14b56a7ef;hp=a32e484906c19b0944599a47f8b0932adde24b0b;hpb=1aa6cd9b865e366737dcc9d2d36c4f8faed5bc4f;p=libs%2Fgltk.git diff --git a/source/vslider.cpp b/source/vslider.cpp index a32e484..1145b97 100644 --- a/source/vslider.cpp +++ b/source/vslider.cpp @@ -32,6 +32,10 @@ void VSlider::rebuild_special(const Part &part, CachedPart &cache) { if(part.get_name()=="slider") { + const Graphic *graphic = part.get_graphic(state); + if(!graphic) + return; + Alignment align = part.get_alignment(); if(max>min) align.y = (value-min)/(max-min); @@ -44,7 +48,7 @@ void VSlider::rebuild_special(const Part &part, CachedPart &cache) GL::MeshBuilder bld(*cache.mesh); bld.matrix() *= GL::Matrix::translation(pgeom.x, pgeom.y, 0); - part.get_graphic(state)->build(pgeom.w, pgeom.h, bld); + graphic->build(pgeom.w, pgeom.h, bld); } }