diff --git a/src/dialog.cc b/src/dialog.cc index bf2922a..72a0979 100644 --- a/src/dialog.cc +++ b/src/dialog.cc @@ -469,11 +469,11 @@ int a_Dialog_user_password(const char *title, const char *msg, window->add(ok_button); /* "Cancel" button */ - Fl_Button *cancel_button = - new EnterButton(50, y, 100, button_h, "Cancel"); + auto cancel_button = + std::make_unique< EnterButton >(50, y, 100, button_h, "Cancel"); cancel_button->labelsize(14); cancel_button->callback(Dialog_user_password_cb); - window->add(cancel_button); + window->add(cancel_button.release()); y += button_h + 20; window_h = y;