Avoid dereferencing NULL pointer in gtk_label_drag_data_get()

It's possible the GtkLabel receives drag'n'drop related signals
if it was setup to receive them by a container or other external
code, just avoid dereferencing priv->select_info in this case.
This commit is contained in:
Tristan Van Berkom 2011-08-26 18:58:44 +02:00
parent 431227e1af
commit d7696bd25f

View File

@ -5333,7 +5333,8 @@ gtk_label_set_selection_text (GtkLabel *label,
{
GtkLabelPrivate *priv = label->priv;
if ((priv->select_info->selection_anchor !=
if (priv->select_info &&
(priv->select_info->selection_anchor !=
priv->select_info->selection_end) &&
priv->text)
{