Commit 8cd8c879 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Check if guioptions is NULL

CID 276475
parent a9a67104
......@@ -449,12 +449,12 @@ girara_session_init(girara_session_t* session, const char* sessionname)
char* guioptions = NULL;
girara_setting_get(session, "guioptions", &guioptions);
const bool show_hscrollbar = strchr(guioptions, 'h') != NULL;
const bool show_vscrollbar = strchr(guioptions, 'v') != NULL;
const bool show_hscrollbar = guioptions != NULL && strchr(guioptions, 'h') != NULL;
const bool show_vscrollbar = guioptions != NULL && strchr(guioptions, 'v') != NULL;
g_free(guioptions);
scrolled_window_set_scrollbar_visibility(
GTK_SCROLLED_WINDOW(session->gtk.view), show_hscrollbar, show_vscrollbar);
g_free(guioptions);
/* viewport */
gtk_container_add(GTK_CONTAINER(session->gtk.view), session->gtk.viewport);
......
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