From 8e866b95d67ceb5d26c63e81bd3e93e728f60ac7 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sat, 10 May 2014 13:28:10 +0200 Subject: [PATCH] Add check against empty surface pointer --- src/ofxSurfaceGui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ofxSurfaceGui.cpp b/src/ofxSurfaceGui.cpp index d26ac63..2279e7d 100644 --- a/src/ofxSurfaceGui.cpp +++ b/src/ofxSurfaceGui.cpp @@ -2,7 +2,7 @@ ofxSurfaceGui::ofxSurfaceGui() { - + surface = NULL; } ofxSurfaceGui::~ofxSurfaceGui() @@ -18,6 +18,8 @@ void ofxSurfaceGui::setup(ofxTriangleSurface& surfaceForGui) void ofxSurfaceGui::update() { + if (surface == NULL) return; + for ( int i=0; i