]> err.no Git - libchamplain/commitdiff
Check API parameters
authorPierre-Luc Beaudoin <pierre-luc@squidy.info>
Fri, 3 Oct 2008 18:49:28 +0000 (14:49 -0400)
committerPierre-Luc Beaudoin <pierre-luc@squidy.info>
Fri, 3 Oct 2008 18:49:28 +0000 (14:49 -0400)
champlain-gtk/champlainviewembed.c

index aa1de08476701f0acc29d60b42d4d8ecb55df741..50832831c3a3f72d0e28f4651ab0214432902b56 100644 (file)
@@ -146,6 +146,8 @@ mouse_button_cb (GtkWidget *widget, GdkEventButton *event, ChamplainViewEmbed *v
 GtkWidget *
 champlain_view_embed_new (ChamplainView *view)
 {
+  g_return_val_if_fail(CLUTTER_IS_ACTOR(view), NULL);  //FIXME should be CHAMPLAIN_IS_VIEW but doesn't compile
+
   ClutterColor stage_color = { 0x34, 0x39, 0x39, 0xff };
   ChamplainViewEmbed *embed;
   ClutterActor *stage;
@@ -184,6 +186,8 @@ champlain_view_embed_new (ChamplainView *view)
 ChamplainView *
 champlain_view_embed_get_view (ChamplainViewEmbed* embed)
 {
+  g_return_val_if_fail(CHAMPLAIN_IS_VIEW_EMBED(embed), NULL);
+
   ChamplainViewEmbedPrivate *priv = CHAMPLAIN_VIEW_EMBED_GET_PRIVATE (embed);
   return priv->view;
 }