Remove unnecessary NULL checks before g_free()

g_free() is NULL-safe
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-11-17 15:23:17 -08:00
parent 4a52b58b78
commit d55cc79310

View file

@ -233,8 +233,7 @@ _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);
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);
}