From d42c443d24a8e428c43f849b218c9e1a1dca4189 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 10 Feb 2020 00:04:14 +0200 Subject: [PATCH] Check for non-null buffer in Bufferable's refresh function --- source/bufferable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.45.2