Skip to content

Commit f954729

Browse files
authored
Merge pull request #309 from archie94/share_valid_trigger_files
Share URIs for valid file / file paths only
2 parents 61aadc4 + 85c60a5 commit f954729

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/havenapp/main/ui/EventActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ private void shareEvent ()
156156
//convert from paths to Android friendly Parcelable Uri's
157157
for (EventTrigger trigger : mEvent.getEventTriggers())
158158
{
159+
// ignore triggers for which we do not have valid file/file-paths
160+
if (trigger.getMimeType() == null || trigger.getPath() == null)
161+
continue;
162+
159163
File fileIn = new File(trigger.getPath());
160164
Uri u = Uri.fromFile(fileIn);
161165
uris.add(u);

0 commit comments

Comments
 (0)