Skip to content
Snippets Groups Projects
Commit 0f228bb8 authored by erwan's avatar erwan
Browse files

fix: make sure the potentiel exist before computing it

parent 7b8cfb16
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,8 @@ open SimuState ...@@ -49,6 +49,8 @@ open SimuState
module StringMap = Map.Make(String) module StringMap = Map.Make(String)
let (compute_potentiel: 'v SimuState.t -> RdbgPlugin.sl) = let (compute_potentiel: 'v SimuState.t -> RdbgPlugin.sl) =
fun st -> fun st ->
if Register.get_potential () = None then []
else
[("potential", Data.F (SimuState.compute_potentiel st))] [("potential", Data.F (SimuState.compute_potentiel st))]
let (compute_legitimate: bool -> 'v SimuState.t -> bool) = let (compute_legitimate: bool -> 'v SimuState.t -> bool) =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment