From fff161db9febf4035782f12aab8b3e0f38fd7c79 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 24 Apr 2016 00:18:01 +0200 Subject: Fix narrative stylesheet when there is no presentation stylesheet --- src/narrative_window.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/narrative_window.c b/src/narrative_window.c index 5a352f7..2c79185 100644 --- a/src/narrative_window.c +++ b/src/narrative_window.c @@ -481,9 +481,14 @@ NarrativeWindow *narrative_window_new(struct presentation *p, GApplication *app) vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_container_add(GTK_CONTAINER(nw->window), vbox); - stylesheets[0] = p->stylesheet; - stylesheets[1] = narrative_stylesheet(); - stylesheets[2] = NULL; + if ( p->stylesheet != NULL ) { + stylesheets[0] = p->stylesheet; + stylesheets[1] = narrative_stylesheet(); + stylesheets[2] = NULL; + } else { + stylesheets[0] = narrative_stylesheet(); + stylesheets[1] = NULL; + } nw->sceditor = sc_editor_new(nw->p->scblocks, stylesheets, p->lang); cbl = sc_callback_list_new(); sc_callback_list_add_callback(cbl, "sthumb", create_thumbnail, -- cgit v1.2.3