ee_wayland: Fix ecore_wl2 refcounting breakage on some failures

If we have a blacklisted gl implementation then we'll create a canvas,
it'll fail to be useful, and we'll free it - which calls
ecore_wl2_shutdown(), but then we'll also call ecore_wl2_shutdown()
a second time further down the failure path.

Take a bonus reference before freeing the failed canvas to keep refcounts
sane.
This commit is contained in:
Derek Foreman 2018-02-21 16:39:37 -06:00
parent 635448a0a9
commit 0a66978041
1 changed files with 3 additions and 1 deletions

View File

@ -2595,7 +2595,9 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, unsigned int parent, i
eng_err:
/* ecore_evas_free() will call ecore_wl2_display_disconnect()
* and free(ee) */
* and free(ee), it will also call ecore_wl2_shutdown(), so we
* take an extra reference here to keep the count right. */
ecore_wl2_init();
ecore_evas_free(ee);
ee = NULL;
w_err: