[Scummvm-git-logs] scummvm master -> b733efb53d56815d53c89921d2324b8a09350da5

sev- noreply at scummvm.org
Thu Nov 17 19:32:05 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b733efb53d PEGASUS: Fix startup crash when g_vm is not yet take its value


Commit: b733efb53d56815d53c89921d2324b8a09350da5
    https://github.com/scummvm/scummvm/commit/b733efb53d56815d53c89921d2324b8a09350da5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-11-17T20:31:53+01:00

Commit Message:
PEGASUS: Fix startup crash when g_vm is not yet take its value

Changed paths:
    engines/pegasus/items/itemdragger.cpp
    engines/pegasus/timers.cpp


diff --git a/engines/pegasus/items/itemdragger.cpp b/engines/pegasus/items/itemdragger.cpp
index cc0c3e2f18e..2a4ba7dc0d7 100644
--- a/engines/pegasus/items/itemdragger.cpp
+++ b/engines/pegasus/items/itemdragger.cpp
@@ -132,12 +132,12 @@ ItemDragger::ItemDragger(PegasusEngine *owner) : _inventoryDropSpot(kInventoryDr
 	Common::Rect r(kInventoryDropLeft, kInventoryDropTop, kInventoryDropRight, kInventoryDropBottom);
 	_inventoryDropSpot.setArea(r);
 	_inventoryDropSpot.setHotspotFlags(kDropItemSpotFlag);
-	g_allHotspots.push_back(&_inventoryDropSpot);
+	owner->getAllHotspots().push_back(&_inventoryDropSpot);
 
 	r = Common::Rect(kBiochipDropLeft, kBiochipDropTop, kBiochipDropRight, kBiochipDropBottom);
 	_biochipDropSpot.setArea(r);
 	_biochipDropSpot.setHotspotFlags(kDropBiochipSpotFlag);
-	g_allHotspots.push_back(&_biochipDropSpot);
+	owner->getAllHotspots().push_back(&_biochipDropSpot);
 }
 
 void ItemDragger::startTracking(const Input &input) {
diff --git a/engines/pegasus/timers.cpp b/engines/pegasus/timers.cpp
index 9e393f6dddf..d81950ac1b0 100644
--- a/engines/pegasus/timers.cpp
+++ b/engines/pegasus/timers.cpp
@@ -68,7 +68,7 @@ TimeBase::TimeBase(const TimeScale preferredScale) {
 	_pausedRate = 0;
 	_pauseStart = 0;
 
-	g_vm->addTimeBase(this);
+	((PegasusEngine *)g_engine)->addTimeBase(this);
 }
 
 TimeBase::~TimeBase() {




More information about the Scummvm-git-logs mailing list