Merge pull request #625 from coffeemakr/fix-nullpointer-in-background-handler
Check if view still exists in UICallback
This commit is contained in:
commit
d210b600d7
|
@ -1225,12 +1225,16 @@ public class VideoDetailFragment extends BaseFragment implements StreamExtractor
|
||||||
public boolean handleMessage(Message msg) {
|
public boolean handleMessage(Message msg) {
|
||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case BackgroundCallback.MESSAGE_DESCRIPTION:
|
case BackgroundCallback.MESSAGE_DESCRIPTION:
|
||||||
videoDescriptionView.setText((Spanned) msg.obj);
|
if (videoDescriptionView != null) {
|
||||||
videoDescriptionView.setVisibility(View.VISIBLE);
|
videoDescriptionView.setText((Spanned) msg.obj);
|
||||||
|
videoDescriptionView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
case BackgroundCallback.MESSAGE_UPLOADER_DATE:
|
case BackgroundCallback.MESSAGE_UPLOADER_DATE:
|
||||||
videoUploadDateView.setText((String) msg.obj);
|
if (videoUploadDateView != null) {
|
||||||
videoUploadDateView.setVisibility(View.VISIBLE);
|
videoUploadDateView.setText((String) msg.obj);
|
||||||
|
videoUploadDateView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue