From: Mikko Rasa Date: Sun, 9 Feb 2020 22:04:14 +0000 (+0200) Subject: Check for non-null buffer in Bufferable's refresh function X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d42c443d24a8e428c43f849b218c9e1a1dca4189;p=libs%2Fgl.git Check for non-null buffer in Bufferable's refresh function --- diff --git a/source/bufferable.h b/source/bufferable.h index 66a6db18..f47ef4ca 100644 --- a/source/bufferable.h +++ b/source/bufferable.h @@ -46,7 +46,7 @@ public: void use_buffer(Buffer *buf, Bufferable *prev = 0); /** Uploads new data into the buffer if necessary. */ - void refresh() const { if(dirty) update_buffer(); } + void refresh() const { if(buffer && dirty) update_buffer(); } AsyncUpdater *refresh_async() const;