[Scummvm-cvs-logs] scummvm master -> 298ea1a76ede84acff0c41fd52af063d6a51e6a8
sev-
sev at scummvm.org
Mon May 2 15:19:16 CEST 2016
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7ffa209a79 WAGE: Initialize class variables
bf06b3bc18 GUI: Initialize widget padding
050a1cd605 OPENGL: Fix potential crash
62142e5add MADE: Plug memory leak
298ea1a76e MADE: Cleanup
Commit: 7ffa209a79e6158e5e97aca93b4c961b739e8ec1
https://github.com/scummvm/scummvm/commit/7ffa209a79e6158e5e97aca93b4c961b739e8ec1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-02T15:19:07+02:00
Commit Message:
WAGE: Initialize class variables
Changed paths:
engines/wage/macmenu.cpp
engines/wage/macwindow.cpp
diff --git a/engines/wage/macmenu.cpp b/engines/wage/macmenu.cpp
index a97e442..ed5f507 100644
--- a/engines/wage/macmenu.cpp
+++ b/engines/wage/macmenu.cpp
@@ -104,6 +104,9 @@ Menu::Menu(int id, const Common::Rect &bounds, MacWindowManager *wm)
_activeItem = -1;
_activeSubItem = -1;
+ _ccallback = NULL;
+ _cdata = NULL;
+
_tempSurface.create(_screen.w, _font->getFontHeight(), Graphics::PixelFormat::createFormatCLUT8());
}
diff --git a/engines/wage/macwindow.cpp b/engines/wage/macwindow.cpp
index 7ff0f57..8903936 100644
--- a/engines/wage/macwindow.cpp
+++ b/engines/wage/macwindow.cpp
@@ -76,6 +76,8 @@ MacWindow::MacWindow(int id, bool scrollable, bool resizable, bool editable, Mac
_beingDragged = false;
_beingResized = false;
+ _draggedX = _draggedY = 0;
+
_type = kWindowWindow;
}
Commit: bf06b3bc18bbcefd3574f7485f48e256ee498ff5
https://github.com/scummvm/scummvm/commit/bf06b3bc18bbcefd3574f7485f48e256ee498ff5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-02T15:19:07+02:00
Commit Message:
GUI: Initialize widget padding
Changed paths:
gui/widgets/popup.cpp
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index b10b4fb..0b2ea9f 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -388,6 +388,8 @@ PopUpWidget::PopUpWidget(GuiObject *boss, int x, int y, int w, int h, const char
_type = kPopUpWidget;
_selectedItem = -1;
+
+ _leftPadding = _rightPadding = 0;
}
void PopUpWidget::handleMouseDown(int x, int y, int button, int clickCount) {
Commit: 050a1cd605872f245e3a378b8066323b724dd5bb
https://github.com/scummvm/scummvm/commit/050a1cd605872f245e3a378b8066323b724dd5bb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-02T15:19:07+02:00
Commit Message:
OPENGL: Fix potential crash
Changed paths:
backends/graphics/opengl/shader.cpp
diff --git a/backends/graphics/opengl/shader.cpp b/backends/graphics/opengl/shader.cpp
index 27981f2..0b4c677 100644
--- a/backends/graphics/opengl/shader.cpp
+++ b/backends/graphics/opengl/shader.cpp
@@ -37,7 +37,7 @@ namespace {
#pragma mark - Builtin Shader Sources -
-const char *const g_defaultVertexShader =
+const char *const g_defaultVertexShader =
"attribute vec4 position;\n"
"attribute vec2 texCoordIn;\n"
"attribute vec4 blendColorIn;\n"
@@ -286,6 +286,9 @@ GLshader Shader::compileShader(const char *source, GLenum shaderType) {
}
ShaderManager::ShaderManager() : _initializeShaders(true) {
+ for (int i = 0; i < ARRAYSIZE(_builtIn); ++i) {
+ _builtIn[i] = nullptr;
+ }
}
ShaderManager::~ShaderManager() {
Commit: 62142e5add7b46c084727f00f94f9c5593db1e73
https://github.com/scummvm/scummvm/commit/62142e5add7b46c084727f00f94f9c5593db1e73
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-02T15:19:08+02:00
Commit Message:
MADE: Plug memory leak
Changed paths:
engines/made/sound.cpp
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index ad49031..2545273 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -237,6 +237,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
break;
default:
+ delete[] soundBuffer;
return;
}
Commit: 298ea1a76ede84acff0c41fd52af063d6a51e6a8
https://github.com/scummvm/scummvm/commit/298ea1a76ede84acff0c41fd52af063d6a51e6a8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-02T15:19:08+02:00
Commit Message:
MADE: Cleanup
Changed paths:
engines/made/database.cpp
engines/made/pmvplayer.cpp
engines/made/redreader.cpp
engines/made/resource.cpp
engines/made/screen.cpp
engines/made/sound.cpp
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 3eab31a..0020cb3 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -40,6 +40,7 @@ namespace Made {
*/
Object::Object() : _objData(NULL), _freeData(false) {
+ _objSize = 0;
}
Object::~Object() {
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp
index 453e2a4..0beb132 100644
--- a/engines/made/pmvplayer.cpp
+++ b/engines/made/pmvplayer.cpp
@@ -223,7 +223,10 @@ bool PmvPlayer::play(const char *filename) {
//delete _audioStream;
delete _fd;
- _surface->free();
+
+ if(_surface)
+ _surface->free();
+
delete _surface;
return !_aborted;
diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp
index f92ffd8..a0aaf7b 100644
--- a/engines/made/redreader.cpp
+++ b/engines/made/redreader.cpp
@@ -102,7 +102,7 @@ int LzhDecompressor::decompress(Common::SeekableReadStream &source, byte *dest,
int bufsize;
byte* buffer;
- buffer = (byte *) malloc(DICSIZ);
+ buffer = (byte *)calloc(DICSIZ, 1);
_source = &source;
_compSize = sourceLen;
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index f8e763e7..a9734ed 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -43,6 +43,7 @@ Resource::~Resource() {
PictureResource::PictureResource() : _picture(NULL), _picturePalette(NULL) {
_hasPalette = false;
+ _paletteColorCount = 0;
}
PictureResource::~PictureResource() {
@@ -182,6 +183,9 @@ void PictureResource::loadChunked(byte *source, int size) {
/* AnimationResource */
AnimationResource::AnimationResource() {
+ _flags = 0;
+ _width = 0;
+ _height = 0;
}
AnimationResource::~AnimationResource() {
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index edccb68..33edb38 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -91,6 +91,8 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
_currentFontNum = 0;
_fontDrawCtx.clipRect = Common::Rect(320, 200);
_fontDrawCtx.destSurface = _backgroundScreen;
+ _outlineColor = 0;
+ _dropShadowColor = 0;
clearChannels();
}
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index 2545273..908d6e3 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -248,6 +248,9 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
// soundBuffer.
soundBuffer[workChunkSize] = soundBuffer[workChunkSize - 1];
+ for (i = 0; i < chunkSize; i++)
+ soundBuffer[i] = 0;
+
if (deltaType == 1) {
for (i = 0; i < chunkSize - 1; i += 2) {
l = i / 2;
More information about the Scummvm-git-logs
mailing list