combobox: If typechecking, don’t reference before

This commit is contained in:
Daniel Boles 2017-01-20 21:07:26 +00:00
parent 7401794de6
commit f705d0a5fa

View File

@ -2304,7 +2304,7 @@ void
gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
GdkDevice *device)
{
GtkComboBoxPrivate *priv = combo_box->priv;
GtkComboBoxPrivate *priv;
gint x, y, width, height;
GtkTreePath *path = NULL, *ppath;
GtkWidget *toplevel;
@ -2313,6 +2313,8 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
g_return_if_fail (GDK_IS_DEVICE (device));
priv = combo_box->priv;
if (!gtk_widget_get_realized (GTK_WIDGET (combo_box)))
return;
@ -2432,10 +2434,12 @@ gtk_combo_box_real_popdown (GtkComboBox *combo_box)
void
gtk_combo_box_popdown (GtkComboBox *combo_box)
{
GtkComboBoxPrivate *priv = combo_box->priv;
GtkComboBoxPrivate *priv;
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
priv = combo_box->priv;
if (GTK_IS_MENU (priv->popup_widget))
{
gtk_menu_popdown (GTK_MENU (priv->popup_widget));
@ -3964,7 +3968,7 @@ gtk_combo_box_set_model (GtkComboBox *combo_box,
priv = combo_box->priv;
if (model == combo_box->priv->model)
if (model == priv->model)
return;
gtk_combo_box_unset_model (combo_box);
@ -4855,11 +4859,12 @@ void
gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
gint text_column)
{
GtkComboBoxPrivate *priv = combo_box->priv;
GtkComboBoxPrivate *priv;
GtkTreeModel *model;
g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
priv = combo_box->priv;
model = gtk_combo_box_get_model (combo_box);
g_return_if_fail (text_column >= 0);