diff options
author | Paul Gilbert | 2016-04-27 20:11:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-10 16:12:10 -0400 |
commit | 2675580208561c8c8bd9d6908a202006ddf195b7 (patch) | |
tree | e71b0ba92c0b0c40da046dee5b6a7eb42c349882 | |
parent | 74e40be66e231a8eada9bc045828e17f044a7c55 (diff) | |
download | scummvm-rg350-2675580208561c8c8bd9d6908a202006ddf195b7.tar.gz scummvm-rg350-2675580208561c8c8bd9d6908a202006ddf195b7.tar.bz2 scummvm-rg350-2675580208561c8c8bd9d6908a202006ddf195b7.zip |
TITANIC: Fix crashes in PET and text cursor
-rw-r--r-- | engines/titanic/pet_control/pet_load_save.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/support/text_cursor.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/engines/titanic/pet_control/pet_load_save.cpp b/engines/titanic/pet_control/pet_load_save.cpp index 5bfa1d635a..811fd12089 100644 --- a/engines/titanic/pet_control/pet_load_save.cpp +++ b/engines/titanic/pet_control/pet_load_save.cpp @@ -152,8 +152,7 @@ void CPetLoadSave::highlightChange() { for (int idx = 0; idx < SAVEGAME_SLOTS_COUNT; ++idx) _slotNames[idx].setColor(col); - // TODO: Unknown if check - if (true) { + if (_savegameSlotNum != -1) { col = section ? section->getColor(4) : 0; _slotNames[_savegameSlotNum].setLineColor(0, col); } diff --git a/engines/titanic/support/text_cursor.cpp b/engines/titanic/support/text_cursor.cpp index c3d2f20f84..dc78d5350d 100644 --- a/engines/titanic/support/text_cursor.cpp +++ b/engines/titanic/support/text_cursor.cpp @@ -32,7 +32,7 @@ CTextCursor::CTextCursor(CScreenManager *screenManager) : _backRenderSurface(nullptr), _frontRenderSurface(nullptr), _blinkDelay(300), _size(2, 10), _priorBlinkTime(0), _cursorR(0), _cursorG(0), _cursorB(0), _mode(-1) { - screenManager->createSurface(10, 10); + _surface = screenManager->createSurface(10, 10); } CTextCursor::~CTextCursor() { |