Diff between 3df89f700af7375faedfe123d0ce1834963f6878 and af06aebcc75f73298fd7c9dac5361bb9ae8db231

Changed Files

File Additions Deletions Status
mesh/model.c +1 -1 modified

Full Patch

diff --git a/mesh/model.c b/mesh/model.c
index a2b3e5c..e4a7ba9 100644
--- a/mesh/model.c
+++ b/mesh/model.c
@@ -1077,7 +1077,7 @@ static void restore_model_state(struct mesh_model *mod)
 	if (!cbs)
 		return;
 
-	if (l_queue_isempty(mod->bindings) || !mod->cbs->bind) {
+	if (!l_queue_isempty(mod->bindings) && cbs->bind) {
 		for (b = l_queue_get_entries(mod->bindings); b; b = b->next) {
 			if (cbs->bind(L_PTR_TO_UINT(b->data), ACTION_ADD) !=
 							MESH_STATUS_SUCCESS)