Merge lp:~jeremywootten/pantheon-files/fix-1653748-crash-on-cut-paste into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Danielle Foré
Approved revision: 2438
Merged at revision: 2438
Proposed branch: lp:~jeremywootten/pantheon-files/fix-1653748-crash-on-cut-paste
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 25 lines (+7/-2)
1 file modified
libcore/gof-directory-async.vala (+7/-2)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-1653748-crash-on-cut-paste
Reviewer Review Type Date Requested Status
Kirill Romanov (community) test Approve
elementary Apps team Pending
Review via email: mp+314077@code.launchpad.net

Commit message

Fix a regression caused by r2421, which fails to perform a necessary null check.

Description of the change

This fixes a regression caused by r2421, which fails to perform a necessary null check.

To post a comment you must log in.
Revision history for this message
Kirill Romanov (djaler1) wrote :

Works good

review: Approve (test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libcore/gof-directory-async.vala'
2--- libcore/gof-directory-async.vala 2016-12-31 19:42:09 +0000
3+++ libcore/gof-directory-async.vala 2017-01-04 13:47:03 +0000
4@@ -878,7 +878,10 @@
5 bool found;
6
7 foreach (var loc in files) {
8- assert (loc != null);
9+ if (loc == null) {
10+ continue;
11+ }
12+
13 Async? dir = cache_lookup_parent (loc);
14
15 if (dir != null) {
16@@ -895,7 +898,9 @@
17 dirs.append (dir);
18 } else {
19 dir = cache_lookup (loc);
20- dir.file_deleted (dir.file);
21+ if (dir != null) {
22+ dir.file_deleted (dir.file);
23+ }
24 }
25 }
26

Subscribers

People subscribed via source and target branches

to all changes: