X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbufferable.cpp;fp=source%2Fcore%2Fbufferable.cpp;h=24c0f2789f4bae1bf256237587509ff40c408e68;hb=5a3966187c59c8763b7109d252875939e70cc151;hp=8f967df7a89967cf0d83ece6778d6a6ed3640539;hpb=563f11dd3e08263c8094c124c862fb6a398708f2;p=libs%2Fgl.git diff --git a/source/core/bufferable.cpp b/source/core/bufferable.cpp index 8f967df7..24c0f278 100644 --- a/source/core/bufferable.cpp +++ b/source/core/bufferable.cpp @@ -1,6 +1,7 @@ #include #include "buffer.h" #include "bufferable.h" +#include "error.h" using namespace std; @@ -106,6 +107,9 @@ void Bufferable::update_offset() void Bufferable::upload_data(char *target) const { + if(!buffer) + throw invalid_operation("Bufferable::upload_data"); + unsigned data_size = get_data_size(); if(location_dirty) {