Fix: reduced scope and invalidate value
authorRomain Forlot <romain.forlot@iot.bzh>
Mon, 27 Nov 2017 14:18:46 +0000 (15:18 +0100)
committerRomain Forlot <romain.forlot@iot.bzh>
Mon, 27 Nov 2017 14:18:46 +0000 (15:18 +0100)
c/c leads to redefine a variable already declared before

Change-Id: Iee94c38ed78e2d780448b5a43a8883a19a8f4474
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
src/app.cpp

index 324825f..fcdda1f 100644 (file)
@@ -598,7 +598,7 @@ void App::surface_created(uint32_t surface_id) {
    if (!layer_id) {
       HMI_DEBUG("wm", "Newly created surface %d is not associated with any layer! Must be a XDG apps",
                surface_id);
-      auto layer_id = this->layers.get_layer_id(XDG_DRAWING_NAME);
+      layer_id = this->layers.get_layer_id(XDG_DRAWING_NAME);
       if(!layer_id)
       {
           HMI_DEBUG("wm", "No role found for that XDG App");