diff --git a/dtool/src/dtoolutil/executionEnvironment.cxx b/dtool/src/dtoolutil/executionEnvironment.cxx index ac5eb548af..bcf4584ab0 100644 --- a/dtool/src/dtoolutil/executionEnvironment.cxx +++ b/dtool/src/dtoolutil/executionEnvironment.cxx @@ -247,7 +247,7 @@ ns_get_environment_variable(const string &var) const { } else if (var == "MAIN_DIR") { // Return the binary name's parent directory. If we're running inside the // Python interpreter, this will be overridden by a setting from - // panda3dcore.py. + // panda3d/core.py. if (!_binary_name.empty()) { Filename main_dir (_binary_name); main_dir.make_absolute(); diff --git a/dtool/src/dtoolutil/pfstreamBuf.cxx b/dtool/src/dtoolutil/pfstreamBuf.cxx index b97a4691b0..a23d2f64df 100644 --- a/dtool/src/dtoolutil/pfstreamBuf.cxx +++ b/dtool/src/dtoolutil/pfstreamBuf.cxx @@ -121,7 +121,7 @@ int PipeStreamBuf::underflow(void) { #endif /* PHAVE_IOSTREAM */ gbump(-((int)n)); } - delete buf; + delete[] buf; return ret; } diff --git a/panda/src/downloader/download_utils.cxx b/panda/src/downloader/download_utils.cxx index 48f717145f..e090627362 100644 --- a/panda/src/downloader/download_utils.cxx +++ b/panda/src/downloader/download_utils.cxx @@ -40,7 +40,7 @@ check_crc(Filename name) { unsigned long crc = crc32(0L, Z_NULL, 0); crc = crc32(crc, (unsigned char *)buffer, buffer_length); - delete buffer; + delete[] buffer; return crc; } @@ -66,7 +66,7 @@ check_adler(Filename name) { unsigned long adler = adler32(0L, Z_NULL, 0); adler = adler32(adler, (unsigned char *)buffer, buffer_length); - delete buffer; + delete[] buffer; return adler; } diff --git a/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx b/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx index 17a9c5ff58..5e0f52f5a6 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeJPGWriter.cxx @@ -319,7 +319,7 @@ write_data(xel *array, xelval *) { row_pointer[0] = row; (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); } - delete row; + delete[] row; /* Step 6: Finish compression */ diff --git a/samples/music-box/main.py b/samples/music-box/main.py index 774168f782..dd8ecf0299 100755 --- a/samples/music-box/main.py +++ b/samples/music-box/main.py @@ -41,7 +41,7 @@ class MusicBox(DirectObject): # Loading sounds is done in a similar way to loading other things # Loading the main music box song - self.musicBoxSound = base.loadMusic('music/musicbox.ogg') + self.musicBoxSound = loader.loadMusic('music/musicbox.ogg') self.musicBoxSound.setVolume(.5) # Volume is a percentage from 0 to 1 # 0 means loop forever, 1 (default) means # play once. 2 or higher means play that many times @@ -69,7 +69,7 @@ class MusicBox(DirectObject): # Loading the open/close effect # loadSFX and loadMusic are identical. They are often used for organization #(loadMusic is used for background music, loadSfx is used for other effects) - self.lidSfx = base.loadSfx('music/openclose.ogg') + self.lidSfx = loader.loadSfx('music/openclose.ogg') # The open/close file has both effects in it. Fortunatly we can use intervals # to easily define parts of a sound file to play self.lidOpenSfx = SoundInterval(self.lidSfx, duration=2, startTime=0)