mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 06:24:20 +02:00
avoid nullptr deref
This commit is contained in:
parent
dc6bdfae8a
commit
6e13203fec
1 changed files with 6 additions and 2 deletions
|
@ -254,11 +254,15 @@ void AvatarProject::openInInventory() const {
|
|||
DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system"));
|
||||
tablet->loadQMLSource("hifi/commerce/wallet/Wallet.qml");
|
||||
DependencyManager::get<HMDScriptingInterface>()->openTablet();
|
||||
tablet->getTabletRoot()->forceActiveFocus();
|
||||
auto name = getProjectName();
|
||||
|
||||
// I'm not a fan of this, but it's the only current option.
|
||||
auto name = getProjectName();
|
||||
QTimer::singleShot(TIME_TO_WAIT_FOR_INVENTORY_TO_OPEN_MS, [name, tablet]() {
|
||||
tablet->sendToQml(QVariantMap({ { "method", "updatePurchases" }, { "filterText", name } }));
|
||||
});
|
||||
|
||||
QQuickItem* root = tablet->getTabletRoot();
|
||||
if (root) {
|
||||
root->forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue