Remove unnecessary NULL checks before g_free()

g_free() is NULL-safe
parent 4a52b58b
......@@ -233,7 +233,6 @@ _on_text_changed (GtkTextBuffer * text, struct text_view_state *state)
GtkTextIter start, end;
gtk_text_buffer_get_bounds (text, &start, &end);
if (state->str)
g_free (state->str);
state->str = gtk_text_buffer_get_text (text, &start, &end, FALSE);
g_object_set (state->state->shader, "update-shader", TRUE, NULL);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment