aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Melquiond2018-10-23 14:38:01 +0200
committerGuillaume Melquiond2018-10-23 14:39:11 +0200
commit89f5d25c2f7c919ebf581fad78d4ba39992e4007 (patch)
treee406e5124ea563ad528296847789513d27a214ce
parent0a972b941c75bb5e4bde02892e3488c0565a0e39 (diff)
Fix issue #8801.
When opening the query pane, do not try to focus on a query tab that no longer exists.
-rw-r--r--ide/wg_Command.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/ide/wg_Command.ml b/ide/wg_Command.ml
index 8eddfb3149..740ab9c873 100644
--- a/ide/wg_Command.ml
+++ b/ide/wg_Command.ml
@@ -152,9 +152,9 @@ object(self)
method show =
frame#show;
let cur_page = notebook#get_nth_page notebook#current_page in
- let _, _, e =
- List.find (fun (p,_,_) -> p#get_oid == cur_page#get_oid) views in
- e#misc#grab_focus ()
+ match List.find (fun (p,_,_) -> p#get_oid == cur_page#get_oid) views with
+ | (_, _, e) -> e#misc#grab_focus ()
+ | exception Not_found -> ()
method hide =
frame#hide