Summary: | Avoid using a NULL hash table | ||
---|---|---|---|
Product: | Telepathy | Reporter: | vincent |
Component: | tp-farstream | Assignee: | Olivier Crête <olivier.crete> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | guillaume.desmottes |
Version: | git master | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
vincent
2011-07-13 11:45:49 UTC
@@ -231,6 +231,30 @@ tf_call_channel_dispose (GObject *object) ... + while (g_hash_table_iter_next (&iter, &key, &value)) + { + TfCallContent *content = TF_CALL_CONTENT (value); + if (content) + tf_call_content_on_call_channel_gone (content); Why do you have a if (content) here? In which case could the value be NULL ? The other patches are committed Reflex safety I guess, I do not have a particular reason to believe it could be NULL. Branch rebased, amended to remove that check, and repushed. Now that I think more about it, maybe it shoudl just call g_object_run_dispose(content); and make sure every entry point and async callback in the CallContent object checks if the object is still valid. Branch updated with a version that forces dispose on the content, and adds checks to avoid the last ref holder crashing. I don't like this much tbh. Note that for added fun, calling g_simple_async_result_complete in got_content_media_properties will cause that dispose to be called, so the content becomes invalid in the middle of that function. This is guarded for in process_codec_offer now. *** Bug 34816 has been marked as a duplicate of this bug. *** merged |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.