forked from enlightenment/efl
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:
parent
635448a0a9
commit
0a66978041
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue