mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2025-02-16 14:34:46 -06:00
daemon: check for NULL assign callback in AssignableAdaptorFactory
This commit is contained in:
parent
c3373f4a17
commit
35d99f54f2
@ -6,11 +6,15 @@
|
||||
#include <QDebug>
|
||||
|
||||
QDBusAbstractAdaptor *AssignableAdaptorFactory::assignableAdaptor(QObject *parent, const tc_assignable_node_t *node) {
|
||||
if (!node->assign_callback) {
|
||||
// Placeholder node
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
switch (node->value_category) {
|
||||
case TC_ASSIGNABLE_RANGE:
|
||||
return new AssignableVariantRangeAdaptor(parent, node);
|
||||
case TC_ASSIGNABLE_ENUM:
|
||||
qDebug() << "using enum adaptor";
|
||||
return new AssignableEnumAdaptor(parent, node);
|
||||
default:
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user