Merge lp://qastaging/~kklimonda/couchdb-glib/fix-critical into lp://qastaging/couchdb-glib

Proposed by Krzysztof Klimonda
Status: Merged
Merge reported by: Rodrigo Moya
Merged at revision: not available
Proposed branch: lp://qastaging/~kklimonda/couchdb-glib/fix-critical
Merge into: lp://qastaging/couchdb-glib
Diff against target: 12 lines (+1/-1)
1 file modified
couchdb-glib/couchdb-document.c (+1/-1)
To merge this branch: bzr merge lp://qastaging/~kklimonda/couchdb-glib/fix-critical
Reviewer Review Type Date Requested Status
Rodrigo Moya (community) Approve
Review via email: mp+33311@code.qastaging.launchpad.net

Description of the change

PROP_DATABASE is set as G_PARAM_READWRITE | G_PARAM_CONSTRUCT which means that at the construction time its being set up. Current code doesn't check if g_value_get_object returns a valid GObject before referencing it which leads to assertion `G_IS_OBJECT (object)' failing. My fix replaces g_value_get_object and g_object_ref with g_value_dup_object which internally checks whether GValue is actually containing a GObject and returns null otherwise.

To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Thanks, merged to git master

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches