summaryrefslogtreecommitdiff
path: root/endless
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2014-01-15 18:57:15 -0800
committerMatt Watson <mattdangerw@gmail.com>2014-01-15 18:57:15 -0800
commitcd135d242e8afa85427a2a7a24054180f1b79b4a (patch)
treed1df4d19ba8c0c3f8122743bfc2659501f4c7127 /endless
parent47a8558f3672acd9c793815cfc11012c61daf263 (diff)
Fixed ordering of type checking in public C methods
In a couple of places, we would first access the private data of and pointer, and then assert it was the type we were expecting [endlessm/eos-sdk#469]
Diffstat (limited to 'endless')
-rw-r--r--endless/eospagemanager.c6
-rw-r--r--endless/eoswindow.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/endless/eospagemanager.c b/endless/eospagemanager.c
index bb0878f..3ceb4c5 100644
--- a/endless/eospagemanager.c
+++ b/endless/eospagemanager.c
@@ -1073,12 +1073,12 @@ eos_page_manager_set_page_name (EosPageManager *self,
GtkWidget *page,
const gchar *name)
{
- EosPageManagerPrivate *priv = eos_page_manager_get_instance_private (self);
- EosPageManagerPageInfo *info;
-
g_return_if_fail (EOS_IS_PAGE_MANAGER (self));
g_return_if_fail (GTK_IS_WIDGET (page));
+ EosPageManagerPrivate *priv = eos_page_manager_get_instance_private (self);
+ EosPageManagerPageInfo *info;
+
/* Two pages with the same name are not allowed */
if (name != NULL)
{
diff --git a/endless/eoswindow.c b/endless/eoswindow.c
index 42b3cae..ae0fd20 100644
--- a/endless/eoswindow.c
+++ b/endless/eoswindow.c
@@ -872,10 +872,10 @@ void
eos_window_set_page_manager (EosWindow *self,
EosPageManager *page_manager)
{
- EosWindowPrivate *priv = eos_window_get_instance_private (self);
g_return_if_fail (self != NULL && EOS_IS_WINDOW (self));
g_return_if_fail (page_manager != NULL && EOS_IS_PAGE_MANAGER (page_manager));
+ EosWindowPrivate *priv = eos_window_get_instance_private (self);
EosMainArea *main_area = EOS_MAIN_AREA (priv->main_area);
priv->page_manager = page_manager;