[totem] browser-plugin: Don't handle swf with no source
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] browser-plugin: Don't handle swf with no source
- Date: Mon, 5 Dec 2011 22:24:01 +0000 (UTC)
commit 24a7fba5003ead0f3d2b3822dfa0fb53f6b7a99e
Author: Bastien Nocera <hadess hadess net>
Date: Mon Dec 5 22:51:31 2011 +0100
browser-plugin: Don't handle swf with no source
Otherwise we end up loading those empties as if they were the main
content for the page (which they cannot be).
browser-plugin/totemPlugin.cpp | 29 ++++++++++++++++-------------
1 files changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/browser-plugin/totemPlugin.cpp b/browser-plugin/totemPlugin.cpp
index e381add..c6087a3 100644
--- a/browser-plugin/totemPlugin.cpp
+++ b/browser-plugin/totemPlugin.cpp
@@ -2037,20 +2037,23 @@ totemPlugin::Init (NPMIMEType mimetype,
}
useURI = NULL;
- if (totem_pl_parser_can_parse_from_uri (oldSrc, TRUE))
- useURI = oldSrc;
- else if (totem_pl_parser_can_parse_from_uri (mDocumentURI, TRUE))
- useURI = mDocumentURI;
-
- value = (const char *) g_hash_table_lookup (args, "flashvars");
- if (useURI != NULL && value != NULL) {
- TotemQueueCommand *cmd;
- cmd = g_new0 (TotemQueueCommand, 1);
- cmd->type = TOTEM_QUEUE_TYPE_SET_PLAYLIST;
- cmd->string = g_strdup (useURI);
- QueueCommand (cmd);
+ /* Don't do anything if there's no source */
+ if (oldSrc) {
+ if (totem_pl_parser_can_parse_from_uri (oldSrc, TRUE))
+ useURI = oldSrc;
+ else if (totem_pl_parser_can_parse_from_uri (mDocumentURI, TRUE))
+ useURI = mDocumentURI;
+
+ value = (const char *) g_hash_table_lookup (args, "flashvars");
+ if (useURI != NULL && value != NULL) {
+ TotemQueueCommand *cmd;
+ cmd = g_new0 (TotemQueueCommand, 1);
+ cmd->type = TOTEM_QUEUE_TYPE_SET_PLAYLIST;
+ cmd->string = g_strdup (useURI);
+ QueueCommand (cmd);
+ }
+ g_free (oldSrc);
}
- g_free (oldSrc);
#endif
#if 0 //def TOTEM_MULLY_PLUGIN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]