Skip to content
Snippets Groups Projects
Commit 202b9726 authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

phosh: Don't crash if menus weren't created yet

This will usually not happen but it's better to be safe than sorry.
parent 00b6d165
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,7 @@ favorites_activated_cb (PhoshShell *self,
{
PhoshShellPrivate *priv = phosh_shell_get_instance_private (self);
g_return_if_fail (priv->favorites);
phosh_menu_toggle (PHOSH_MENU (priv->favorites));
}
......@@ -111,6 +112,7 @@ app_launched_cb (PhoshShell *self,
{
PhoshShellPrivate *priv = phosh_shell_get_instance_private (self);
g_return_if_fail (priv->favorites);
phosh_menu_hide (PHOSH_MENU (priv->favorites));
}
......@@ -121,6 +123,7 @@ settings_activated_cb (PhoshShell *self,
{
PhoshShellPrivate *priv = phosh_shell_get_instance_private (self);
g_return_if_fail (priv->settings);
phosh_menu_toggle (PHOSH_MENU (priv->settings));
}
......@@ -131,6 +134,7 @@ setting_done_cb (PhoshShell *self,
{
PhoshShellPrivate *priv = phosh_shell_get_instance_private (self);
g_return_if_fail (priv->settings);
phosh_menu_hide (PHOSH_MENU (priv->settings));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment