diff options
author | Xan Lopez <xan@igalia.com> | 2012-03-07 18:55:57 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-03-07 18:55:57 +0800 |
commit | 7c2104174ab144d12001e646fd464522d5eef517 (patch) | |
tree | b748de1ba0903a1ac54f2eadb32613bc49aefe13 /src/ephy-history-window.c | |
parent | b29db28368dcc1539fea4bcd8b6f11e54f058d69 (diff) | |
download | gsoc2013-epiphany-7c2104174ab144d12001e646fd464522d5eef517.tar.gz gsoc2013-epiphany-7c2104174ab144d12001e646fd464522d5eef517.tar.zst gsoc2013-epiphany-7c2104174ab144d12001e646fd464522d5eef517.zip |
ephy-history-window: correct asserts and g_return_if_fail
Don't assert parameters in public methods, don't g_return_if_fail
parameters in private ones.
Diffstat (limited to 'src/ephy-history-window.c')
-rw-r--r-- | src/ephy-history-window.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 506e7045c..2a46ec685 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -1310,12 +1310,11 @@ ephy_history_window_new (EphyHistoryService *history_service) { EphyHistoryWindow *editor; - g_assert (history_service != NULL); + g_return_val_if_fail (history_service != NULL, NULL); - editor = EPHY_HISTORY_WINDOW (g_object_new - (EPHY_TYPE_HISTORY_WINDOW, - "history-service", history_service, - NULL)); + editor = g_object_new (EPHY_TYPE_HISTORY_WINDOW, + "history-service", history_service, + NULL); ephy_history_window_construct (editor); @@ -1369,12 +1368,7 @@ ephy_history_window_init (EphyHistoryWindow *editor) static void ephy_history_window_dispose (GObject *object) { - EphyHistoryWindow *editor; - - g_return_if_fail (object != NULL); - g_return_if_fail (EPHY_IS_HISTORY_WINDOW (object)); - - editor = EPHY_HISTORY_WINDOW (object); + EphyHistoryWindow *editor = EPHY_HISTORY_WINDOW (object); if (editor->priv->hosts_view != NULL) { |