summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/til_fb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/til_fb.c b/src/til_fb.c
index 951688c..a802c40 100644
--- a/src/til_fb.c
+++ b/src/til_fb.c
@@ -579,17 +579,17 @@ int til_fb_new(const til_fb_ops_t *ops, const char *title, const til_setup_t *se
goto fail;
}
- for (int i = 0; i < n_pages; i++)
- _til_fb_page_new(fb);
-
- fb->n_pages = n_pages;
-
pthread_mutex_init(&fb->ready_mutex, NULL);
pthread_cond_init(&fb->ready_cond, NULL);
pthread_mutex_init(&fb->inactive_mutex, NULL);
pthread_cond_init(&fb->inactive_cond, NULL);
pthread_mutex_init(&fb->rebuild_mutex, NULL);
+ for (int i = 0; i < n_pages; i++)
+ _til_fb_page_new(fb);
+
+ fb->n_pages = n_pages;
+
page = _til_fb_page_get(fb);
if (!page) {
r = -ENOMEM;
© All Rights Reserved