From 0195a6956885754c4e858fe293eb605f5b5b1145 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Mon, 18 Jul 2016 23:42:10 +0800 Subject: [PATCH] fixed NPE --- .../mariotaku/twidere/service/BackgroundOperationService.java | 2 +- .../kotlin/org/mariotaku/twidere/fragment/GifPageFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/twidere/src/main/java/org/mariotaku/twidere/service/BackgroundOperationService.java b/twidere/src/main/java/org/mariotaku/twidere/service/BackgroundOperationService.java index c42491d98..e12f61a6c 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/service/BackgroundOperationService.java +++ b/twidere/src/main/java/org/mariotaku/twidere/service/BackgroundOperationService.java @@ -464,7 +464,7 @@ public class BackgroundOperationService extends IntentService implements Constan try { body = UpdateStatusTask.Companion.getBodyFromMedia(getContentResolver(), mediaUri, new MessageMediaUploadListener(this, mNotificationManager, - builder, text)); + builder, text), null); final MediaUploadResponse uploadResp = uploadMedia(twitterUpload, body); final DirectMessage response = twitter.sendDirectMessage(recipientId, text, uploadResp.getId()); diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/GifPageFragment.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/GifPageFragment.kt index a55e79de6..19705185e 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/GifPageFragment.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/GifPageFragment.kt @@ -55,7 +55,7 @@ class GifPageFragment : CacheDownloadMediaViewerFragment() { } override fun recycleMedia() { - gifView.setInputSource(null) + gifView?.setInputSource(null) } private val media: ParcelableMedia