diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/internal.c | 5 |
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]; |