Android: Fix crash, don't add null visible menus to pendingContextMenus
Regression introduced in e3689949ba
Change-Id: I9d3e37733d933e037f04d3a6efaf05607e16d9c5
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
parent
69ab280315
commit
7696ff89c9
@ -93,7 +93,8 @@ namespace QtAndroidMenu
|
||||
void showContextMenu(QAndroidPlatformMenu *menu, const QRect &anchorRect, JNIEnv *env)
|
||||
{
|
||||
QMutexLocker lock(&visibleMenuMutex);
|
||||
pendingContextMenus.append(visibleMenu);
|
||||
if (visibleMenu)
|
||||
pendingContextMenus.append(visibleMenu);
|
||||
visibleMenu = menu;
|
||||
menu->aboutToShow();
|
||||
env->CallStaticVoidMethod(applicationClass(), openContextMenuMethodID, anchorRect.x(), anchorRect.y(), anchorRect.width(), anchorRect.height());
|
||||
|
Loading…
Reference in New Issue
Block a user