aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/internal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal.c b/src/internal.c
index bc5080f..2f277bb 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -109,6 +109,11 @@ puglPreRealize(PuglView* const view)
return PUGL_BAD_BACKEND;
}
+ // Ensure that the view has an event handler
+ if (!view->eventFunc) {
+ return PUGL_BAD_CONFIGURATION;
+ }
+
// Set the size to the default if it hasn't already been set
if (!isValidSize(view->frame.width, view->frame.height)) {
const PuglViewSize defaultSize = view->sizeHints[PUGL_DEFAULT_SIZE];