]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't bind the default object if nothing was bound before
authorMikko Rasa <tdb@tdb.fi>
Fri, 17 Oct 2014 18:40:28 +0000 (21:40 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 17 Oct 2014 18:40:28 +0000 (21:40 +0300)
source/bindable.h

index 20b6482a9ec92009e555e9cdbe34519e49699787..b2634ea92bd4b1b43bb1f88b502af230f1e3c4bd 100644 (file)
@@ -56,7 +56,8 @@ public:
 
        static void unbind()
        {
-               default_object().bind();
+               if(Bindable<T>::cur_obj)
+                       default_object().bind();
        }
 
        static const T &default_object()