Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
Simple fix to prevent null reference error in main JS, see #196
Browse files Browse the repository at this point in the history
  • Loading branch information
kbhomes committed Jun 18, 2014
1 parent bbf3400 commit 756f721
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion radiant-player-mac/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,13 @@ - (void)webView:(WebView *)webView didClearWindowObject:(WebScriptObject *)windo

- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
{
// Only apply the main script file when the player is ready.
if ([[webView mainFrameDocument] querySelector:@"#playerSongInfo"]) {
[self evaluateJavaScriptFile:@"main"];
}

[self evaluateJavaScriptFile:@"keyboard"];
[self evaluateJavaScriptFile:@"mouse"];
[self evaluateJavaScriptFile:@"main"];
[self evaluateJavaScriptFile:@"styles"];

// Apply the navigation styles.
Expand Down

0 comments on commit 756f721

Please sign in to comment.