diff options
author | David Robillard <d@drobilla.net> | 2021-05-03 14:45:51 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-03 18:30:39 -0400 |
commit | 1b5cc87acd7cd6e12baab2f5b550b0d69f1361d5 (patch) | |
tree | ca89ab10280f5ba9808bddd6766eba3e725fdf5a /src/implementation.c | |
parent | 66e589325d13e4efc195a80125805df4b0996a97 (diff) | |
download | pugl-1b5cc87acd7cd6e12baab2f5b550b0d69f1361d5.tar.gz pugl-1b5cc87acd7cd6e12baab2f5b550b0d69f1361d5.tar.bz2 pugl-1b5cc87acd7cd6e12baab2f5b550b0d69f1361d5.zip |
Fix crash when freeing a view that has not been configured
Diffstat (limited to 'src/implementation.c')
-rw-r--r-- | src/implementation.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/implementation.c b/src/implementation.c index 79ac5d6..d3a6647 100644 --- a/src/implementation.c +++ b/src/implementation.c @@ -163,7 +163,9 @@ puglNewView(PuglWorld* const world) void puglFreeView(PuglView* view) { - puglDispatchSimpleEvent(view, PUGL_DESTROY); + if (view->eventFunc && view->backend) { + puglDispatchSimpleEvent(view, PUGL_DESTROY); + } // Remove from world view list PuglWorld* world = view->world; |