From 41d757e0c446ee67b4fc5ad544bd8a0543802fdc Mon Sep 17 00:00:00 2001 From: Jeremy Lujan Date: Tue, 14 Dec 2010 21:38:52 -0600 Subject: [PATCH] *Fix issue in setParameters due to expression in while condition in CPFlashView *Protect against overwriting flashvars in _params when setParams is called after setFlashVars in CPFlashView --- AppKit/CPFlashView.j | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AppKit/CPFlashView.j b/AppKit/CPFlashView.j index 00a0102df..1bec0894e 100644 --- a/AppKit/CPFlashView.j +++ b/AppKit/CPFlashView.j @@ -134,7 +134,10 @@ var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; _DOMObjectElement.removeChild([elements objectAtIndex:i]); } #endif - _params = aDictionary; + if (!_params) + _params = aDictionary; + else + [_params addEntriesFromDictionary:aDictionary]; #if PLATFORM(DOM) if (!CPBrowserIsEngine(CPInternetExplorerBrowserEngine)) { @@ -143,7 +146,7 @@ var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; var enumerator = [_params keyEnumerator], key; - while (key = [enumerator nextObject] && _DOMObjectElement) + while (_DOMObjectElement && (key = [enumerator nextObject])) { var param = document.createElement(@"param"); param.name = key;