Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1772)

Unified Diff: Source/modules/webaudio/AudioBufferSourceNode.cpp

Issue 50363005: Check that buffer exists before trying to get its duration. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioBufferSourceNode.cpp
diff --git a/Source/modules/webaudio/AudioBufferSourceNode.cpp b/Source/modules/webaudio/AudioBufferSourceNode.cpp
index 331d300ab44fef25769b71c359efcfcf1b4f5c05..875621293829a4497b5a690a4f68d3f1a0765e2b 100644
--- a/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -383,12 +383,12 @@ unsigned AudioBufferSourceNode::numberOfChannels()
void AudioBufferSourceNode::start(double when)
{
- startPlaying(false, when, 0, buffer()->duration());
+ startPlaying(false, when, 0, buffer() ? buffer()->duration() : 0);
}
void AudioBufferSourceNode::start(double when, double grainOffset)
{
- startPlaying(true, when, grainOffset, buffer()->duration());
+ startPlaying(true, when, grainOffset, buffer() ? buffer()->duration() : 0);
}
void AudioBufferSourceNode::start(double when, double grainOffset, double grainDuration)
« no previous file with comments | « LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698