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 677363 - grid: Add missing guard to gtk_grid_get_child_at()
grid: Add missing guard to gtk_grid_get_child_at()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-06-02 23:50 UTC by Bastian Winkler
Modified: 2012-06-04 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
grid: Add missing guard to gtk_grid_get_child_at() (955 bytes, patch)
2012-06-02 23:50 UTC, Bastian Winkler
committed Details | Review
grid: Fix access to grid->priv member (1.29 KB, patch)
2012-06-02 23:51 UTC, Bastian Winkler
committed Details | Review

Description Bastian Winkler 2012-06-02 23:50:27 UTC
Add missing guard to make sure it's called with a GtkGrid argument.
Comment 1 Bastian Winkler 2012-06-02 23:50:29 UTC
Created attachment 215515 [details] [review]
grid: Add missing guard to gtk_grid_get_child_at()
Comment 2 Bastian Winkler 2012-06-02 23:51:30 UTC
Created attachment 215516 [details] [review]
grid: Fix access to grid->priv member

The priv member should be accessed after the g_return_if_fail test
Comment 3 Emmanuele Bassi (:ebassi) 2012-06-03 00:06:33 UTC
Review of attachment 215515 [details] [review]:

looks good
Comment 4 Emmanuele Bassi (:ebassi) 2012-06-03 00:06:50 UTC
Review of attachment 215516 [details] [review]:

looks good
Comment 5 Bastian Winkler 2012-06-03 00:15:26 UTC
Attachment 215515 [details] pushed as 4fee1aa - grid: Add missing guard to gtk_grid_get_child_at()
Attachment 215516 [details] pushed as b0ea458 - grid: Fix access to grid->priv member
Comment 6 Matthias Clasen 2012-06-04 14:48:30 UTC
not a big deal, but I will say that I just copying the pointer is not a problem. We're not dereferencing priv before the return_if_fail...