Merge lp:~dobey/ubuntuone-client/fix-570261-stable into lp:ubuntuone-client/stable-1-2

Proposed by dobey
Status: Merged
Approved by: Natalia Bidart
Approved revision: 513
Merged at revision: 513
Proposed branch: lp:~dobey/ubuntuone-client/fix-570261-stable
Merge into: lp:ubuntuone-client/stable-1-2
Diff against target: 16 lines (+4/-2)
1 file modified
nautilus/ubuntuone-nautilus.c (+4/-2)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/fix-570261-stable
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Rodrigo Moya (community) Approve
Review via email: mp+26317@code.launchpad.net

Commit message

As path can be NULL, guard against calling hash_remove with it

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Is there any way I can test this, manually at least?

review: Needs Information
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Indeed g_hash_table_* crash if the passed argument is NULL (although it should really not), so looks good

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nautilus/ubuntuone-nautilus.c'
2--- nautilus/ubuntuone-nautilus.c 2010-04-16 16:23:19 +0000
3+++ nautilus/ubuntuone-nautilus.c 2010-05-28 15:27:40 +0000
4@@ -1475,8 +1475,10 @@
5 gchar * path;
6
7 path = g_hash_table_lookup (hash, "path");
8- g_hash_table_remove (uon->udfs, path);
9- ubuntuone_nautilus_reset_emblem (uon, path);
10+ if (path != NULL) {
11+ g_hash_table_remove (uon->udfs, path);
12+ ubuntuone_nautilus_reset_emblem (uon, path);
13+ }
14 }
15
16 static void ubuntuone_nautilus_udf_error (DBusGProxy * proxy,

Subscribers

People subscribed via source and target branches

to all changes: