Commit 4af588e4 authored by Matthias Clasen's avatar Matthias Clasen

Getting started: Fix a corner case

When using 'Words' without a loaded document, the example
would crash. Thats not nice, so avoid it.
parent 7fe3455c
......@@ -89,6 +89,10 @@ update_words (ExampleAppWindow *win)
priv = example_app_window_get_instance_private (win);
tab = gtk_stack_get_visible_child (GTK_STACK (priv->stack));
if (tab == NULL)
return;
view = gtk_bin_get_child (GTK_BIN (tab));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (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