mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-30 03:44:55 +01:00
Fix invalid free
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
876d35de94
commit
596262bb43
1 changed files with 5 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue