Fix for context not rebuilding correctly 95/212595/1
authorAdrian Wojciechowski <a.wojciecho3@partner.samsung.com>
Fri, 23 Aug 2019 08:07:05 +0000 (10:07 +0200)
committerAdrian Wojciechowski <a.wojciecho3@partner.samsung.com>
Fri, 23 Aug 2019 08:07:05 +0000 (10:07 +0200)
Change-Id: I13428576d5a1cc321cbe3df03f7e78187a38615a

src/NavigationInterface.cpp

index e959d3e046785afbcfce5c8cea890cf2c1f49f0b..f0c9a0b5f99860f4fa760b90a366724691ddd26e 100644 (file)
@@ -839,10 +839,14 @@ private:
                                        unsigned int rebuildId;
                                        ~Contextes()
                                        {
-                                               ASSERT(real || keyboard);
-                                               if (!real)
-                                                       real = std::move(keyboard);
-                                               self->buildNavigationElementsTreeAndEmitContextChanged(rebuildId, std::move(*real), std::move(keyboard));
+                                               if (real || keyboard) {
+                                                       if (!real)
+                                                               real = std::move(keyboard);
+                                                       self->buildNavigationElementsTreeAndEmitContextChanged(rebuildId, std::move(*real), std::move(keyboard));
+                                               }
+                                               else {
+                                                       self->initializeRebuildingContext(true);
+                                               }
                                        }
                                };
                                auto contextes = std::make_shared<Contextes>();