Commit 596262bb authored by Sebastian Ramacher's avatar Sebastian Ramacher

Fix invalid free

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 876d35de
......@@ -1286,7 +1286,7 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
}
static int pages_per_row = 1;
static char* first_page_column_list = "1:2";
static char* first_page_column_list = NULL;
static double zoom = 1.0;
const girara_mode_t old_mode = girara_mode_get(session);
......@@ -1295,7 +1295,9 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
girara_setting_set(session, "pages-per-row", &pages_per_row);
/* reset first page column */
girara_setting_set(session, "first-page-column", first_page_column_list);
if (first_page_column_list != NULL) {
girara_setting_set(session, "first-page-column", first_page_column_list);
}
/* show status bar */
gtk_widget_show(GTK_WIDGET(session->gtk.statusbar));
......@@ -1316,6 +1318,7 @@ sc_toggle_presentation(girara_session_t* session, girara_argument_t*
/* backup first page column */
g_free(first_page_column_list);
/* this will leak. we need to move the values somewhere else */
girara_setting_get(session, "first-page-column", &first_page_column_list);
/* set single view */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment