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 |
Related bugs: |
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.
Thanks, merged to git master