aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-06-26 23:03:11 +0800
committerChristian Persch <chpe@src.gnome.org>2003-06-26 23:03:11 +0800
commited734ac6890029f657a94dc3e8ff419d34251c88 (patch)
tree328e81206431ea9aeca2236398a5e01e1fdd4b89
parent5c4078df2c17f93ca5e2ec679f65bac7c9102e6f (diff)
downloadgsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.tar
gsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.tar.gz
gsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.tar.bz2
gsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.tar.lz
gsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.tar.xz
gsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.tar.zst
gsoc2013-epiphany-ed734ac6890029f657a94dc3e8ff419d34251c88.zip
Check dom_event, emit warning and return if it is NULL.
2003-06-26 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/mozilla-embed.cpp: (mozilla_embed_dom_key_down_cb), (mozilla_embed_dom_mouse_down_cb), (mozilla_embed_dom_mouse_click_cb): Check dom_event, emit warning and return if it is NULL.
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/mozilla-embed.cpp20
2 files changed, 26 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c2e13e30..0480083f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-06-26 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/mozilla-embed.cpp: (mozilla_embed_dom_key_down_cb),
+ (mozilla_embed_dom_mouse_down_cb), (mozilla_embed_dom_mouse_click_cb):
+
+ Check dom_event, emit warning and return if it is NULL.
+
2003-06-26 Marco Pesenti Gritti <marco@it.gnome.org>
* src/ephy-window.c: (tab_added_cb):
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index ad78db187..831e9d059 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -1320,6 +1320,12 @@ static gint
mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event,
MozillaEmbed *membed)
{
+ if (dom_event == NULL)
+ {
+ g_warning ("mozilla_embed_dom_key_down_cb: domevent NULL");
+ return FALSE;
+ }
+
nsCOMPtr<nsIDOMKeyEvent> ev = static_cast<nsIDOMKeyEvent*>(dom_event);
if (!ev)
{
@@ -1384,6 +1390,12 @@ mozilla_embed_dom_mouse_click_cb (GtkMozEmbed *embed, gpointer dom_event,
EphyWrapper *wrapper;
nsresult result;
+ if (dom_event == NULL)
+ {
+ g_warning ("mozilla_embed_dom_mouse_click_cb: domevent NULL");
+ return FALSE;
+ }
+
info = ephy_embed_event_new ();
wrapper = MOZILLA_EMBED(membed)->priv->wrapper;
@@ -1425,11 +1437,17 @@ mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event,
nsresult result;
EphyEmbedEventType type;
+ if (dom_event == NULL)
+ {
+ g_warning ("mozilla_embed_dom_mouse_down_cb: domevent NULL");
+ return FALSE;
+ }
+
info = ephy_embed_event_new ();
wrapper = MOZILLA_EMBED(membed)->priv->wrapper;
g_return_val_if_fail (wrapper != NULL, G_FAILED);
-
+
event_context.Init (wrapper);
result = event_context.GetMouseEventInfo (static_cast<nsIDOMMouseEvent*>(dom_event), info);