Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/controllers/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ class Controller : public QObject {
template<typename SpecificMappingType>
std::shared_ptr<SpecificMappingType> downcastAndTakeOwnership(
std::shared_ptr<LegacyControllerMapping>&& pMapping) {
// When unsetting a mapping (select 'No mapping') we receive a nullptr
if (pMapping == nullptr) {
return nullptr;
}
// Controller cannot take ownership if pMapping is referenced elsewhere because
// the controller polling thread needs exclusive accesses to the non-thread safe
// LegacyControllerMapping.
Expand Down
1 change: 1 addition & 0 deletions src/controllers/controllermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ void ControllerManager::slotApplyMapping(Controller* pController,
if (!pMapping) {
closeController(pController);
// Unset the controller mapping for this controller
pController->setMapping(nullptr);
m_pConfig->remove(key);
emit mappingApplied(false);
return;
Expand Down