Browse Source

add exceptions

CPP-GTK4
yggverse 2 months ago
parent
commit
f2e4981fdc
  1. 20
      src/app/browser/main/tab.cpp

20
src/app/browser/main/tab.cpp

@ -33,14 +33,14 @@ Glib::ustring Tab::get_page_title( @@ -33,14 +33,14 @@ Glib::ustring Tab::get_page_title(
PAGE_NUMBER
);
if (pageWidget != nullptr)
if (pageWidget == nullptr)
{
auto tabPage = (tab::Page *) pageWidget;
return tabPage->get_title();
throw _("Tab page not found!");
}
return ""; // @TODO
auto tabPage = (tab::Page *) pageWidget;
return tabPage->get_title();
};
Glib::ustring Tab::get_page_subtitle(
@ -50,14 +50,14 @@ Glib::ustring Tab::get_page_subtitle( @@ -50,14 +50,14 @@ Glib::ustring Tab::get_page_subtitle(
PAGE_NUMBER
);
if (pageWidget != nullptr)
if (pageWidget == nullptr)
{
auto tabPage = (tab::Page *) pageWidget;
return tabPage->get_subtitle();
throw _("Tab page not found!");
}
return ""; // @TODO
auto tabPage = (tab::Page *) pageWidget;
return tabPage->get_subtitle();
};
// Actions

Loading…
Cancel
Save