After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 318214 - gtktexttag.c: "gtk_text_attributes_ref" must return a value
gtktexttag.c: "gtk_text_attributes_ref" must return a value
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.8.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-10-07 15:45 UTC by Kazuki Iwamoto
Modified: 2005-10-07 16:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2005-10-07 15:45:27 UTC
Please describe the problem:
"gtk_text_attributes_ref" returns a pointer.
But "g_return_if_fail" doesn't return value.
We should use "g_return_val_if_fail" in gtk_text_attributes_ref.
It was happened by the following change.
http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtktexttag.c?r1=1.75&r2=1.75.2.1

Steps to reproduce:
1. call gtk_text_attributes_ref with "values == NULL".

Actual results:
gtk_text_attributes_ref returns random value.

Expected results:
gtk_text_attributes_ref should return NULL if "values == NULL".

Does this happen every time?
every time

Other information:
Comment 1 Matthias Clasen 2005-10-07 16:01:26 UTC
2005-10-07   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktexttag.c (gtk_text_attributes_ref): Use
        g_return_val_if_fail(), not g_return_if_fail().  (#318412,
        Kazuki Iwamoto)