aboutsummaryrefslogtreecommitdiff
path: root/src/narrative_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/narrative_window.c')
-rw-r--r--src/narrative_window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/narrative_window.c b/src/narrative_window.c
index 70838c7..9727e3c 100644
--- a/src/narrative_window.c
+++ b/src/narrative_window.c
@@ -430,7 +430,8 @@ static void last_para_sig(GSimpleAction *action, GVariant *parameter,
static void open_clock_sig(GSimpleAction *action, GVariant *parameter, gpointer vp)
{
NarrativeWindow *nw = vp;
- nw->pr_clock = pr_clock_new();
+ if ( nw->pr_clock != NULL ) return;
+ nw->pr_clock = pr_clock_new(&nw->pr_clock);
}
@@ -516,6 +517,7 @@ static void scroll_down(NarrativeWindow *nw)
static gboolean nw_destroy_sig(GtkWidget *da, NarrativeWindow *nw)
{
+ if ( nw->pr_clock != NULL ) pr_clock_destroy(nw->pr_clock);
g_application_release(nw->app);
return FALSE;
}