Permalink
Browse files

need to call disable on destructor or else dangling references in eve…

…nts will cause application crash
  • Loading branch information...
1 parent a69f61c commit 6b932d3a4ec719fd2980aeb9b1aa89c52937a1a6 @obviousjim committed Aug 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/ofxUICanvas.h
View
@@ -34,6 +34,7 @@ class ofxUICanvas : public ofxUIWidget
public:
~ofxUICanvas()
{
+ disable();
delete GUIevent;
if(!hasSharedResources)
{
@@ -51,7 +52,7 @@ class ofxUICanvas : public ofxUIWidget
ofxUICanvas(ofRectangle r)
{
- rect = new ofxUIRectangle(r);
+ rect = new ofxUIRectangle(r);
init(r.width,r.height);
}

0 comments on commit 6b932d3

Please sign in to comment.