downstream: clients: do not free ivi-shell related structs twice. 74/33774/1
authorJan Ekström <jan.ekstrom@intel.com>
Mon, 12 Jan 2015 14:04:58 +0000 (16:04 +0200)
committerJan Ekström <jan.ekstrom@intel.com>
Wed, 14 Jan 2015 13:35:01 +0000 (15:35 +0200)
Fixes double free happening in example clients when closing an
application. These structures are free'd at another point.

This reverts a part of commit 9e36092,
"downstream: clients: support for --no-ivi-surface command line option"

Change-Id: I5b1d75fa48d1316d6abab6cc12be407a8370858f

clients/window.c

index 3ddd669..a04bebb 100644 (file)
@@ -1557,12 +1557,6 @@ surface_destroy(struct surface *surface)
        if (surface->toysurface)
                surface->toysurface->destroy(surface->toysurface);
 
-       if (surface->window->display->ivi_application) {
-               if(surface->window->ivi_surface && strcmp(surface->window->title,"Virtual keyboard"))
-                       ivi_surface_destroy(surface->window->ivi_surface);
-               ivi_application_destroy(surface->window->display->ivi_application);
-       }
-
        wl_list_remove(&surface->link);
        free(surface);
 }