Skip to content

Commit fb51d43

Browse files
committed
fix: unexpected null pointers
1 parent 30abcd8 commit fb51d43

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ public async void Startup()
153153
{
154154
// Clear the "Reset" PlayerPrefs flag
155155
_sceneWasReset = PlayerPrefs.GetInt(SCENE_RESET_KEY, 0) == 1;
156-
PlayerPrefs.SetInt(SCENE_RESET_KEY, 0);
157156

158157
// STARTUP SEQUENCE
159158
StartupEvent_MetaLoaded.Invoke();
@@ -208,6 +207,7 @@ public async void Startup()
208207
ProbeManager.ActiveProbeUIUpdateEvent.AddListener(() => SetSurfaceDebugColor(ProbeManager.ActiveProbeManager.Color));
209208

210209
// Complete
210+
PlayerPrefs.SetInt(SCENE_RESET_KEY, 0);
211211
StartupEvent_Complete.Invoke();
212212

213213
// After annotation loads, check if the user wants to load previously used probes

Assets/Scripts/Pinpoint/Utilities/Settings.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,11 @@ private void Apply()
706706

707707
// Atlas
708708
AtlasName = data.AtlasName;
709+
if (PlayerPrefs.GetInt("scene-rest", 0) == 0)
710+
AtlasTransformName = data.AtlasTransformName;
711+
else
712+
AtlasTransformName = INVIVO_DEFAULT;
709713
// the relative coordinate actually needs to be set, since it gets propagated downstream
710-
AtlasTransformName = data.AtlasTransformName;
711714
ReferenceCoord = data.RelativeCoord;
712715
_blSlider.SetValueWithoutNotify(BregmaLambdaDistance);
713716

Packages/packages-lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
"depth": 0,
224224
"source": "git",
225225
"dependencies": {},
226-
"hash": "d4b826927f73db079701bd929007421b40573d1b"
226+
"hash": "8f1d5e978814b53f242ddd32e18c9f6dfc29cc23"
227227
},
228228
"vbl.urchin": {
229229
"version": "https://github.com/VirtualBrainLab/Urchin.git?path=/UnityClient/Packages/vbl.urchin",

0 commit comments

Comments
 (0)