Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isShowing()' on a null object reference #267

Closed
TxcA opened this issue Mar 11, 2020 · 2 comments
Closed

isShowing()' on a null object reference #267

TxcA opened this issue Mar 11, 2020 · 2 comments
Labels
bug pending release 待发布正式版

Comments

@TxcA
Copy link

TxcA commented Mar 11, 2020

  • 系统版本:Android 10
  • 库版本:2.2.2.2
  • 问题描述/重现步骤:
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean razerdp.basepopup.PopupWindowProxy.isShowing()' on a null object reference
        if (loadingPopup != null && loadingPopup.isShowing()) {
            loadingPopup.dismiss();
        }

Fix:

    /**
     * PopupWindow是否处于展示状态
     */
    public boolean isShowing() {
          return mPopupWindow == null ? false : mPopupWindow.isShowing();
    }
@razerdp
Copy link
Owner

razerdp commented Mar 11, 2020

一般来说,popup的回收只有activity已经destroy之后才会发生,或者是lazypopup中,请问您是否符合上述两种情况之一?

不过这里确实会存在这个问题,感谢指出~

@razerdp razerdp added bug pending release 待发布正式版 labels Mar 11, 2020
@razerdp
Copy link
Owner

razerdp commented Mar 11, 2020

@TxcA fixed in 【Candy 2.2.3.20200311】

@TxcA TxcA closed this as completed Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pending release 待发布正式版
Projects
None yet
Development

No branches or pull requests

2 participants