Fixes segfault on close. Using the right objective (d_main_gui) instead of d_object...