]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
GuiSearch did not work with num. keypad enter
[lyx.git] / src / Buffer.cpp
index c46dab75ba4b45ec1389786f7db7bd227fb7c3d2..8414efa20439fbe50cc696f74dd1debc96caafcc 100644 (file)
@@ -2944,7 +2944,9 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                                undo().recordUndoBufferParams(CursorData());
                                branch_list.add(branch_name);
                                branch = branch_list.find(branch_name);
-                               branch->setColors("background", "background");
+                               if (branch)
+                                       // needed to update the color table for dark mode
+                                       branch->setColors("background", "background");
                                dr.setError(false);
                                dr.screenUpdate(Update::Force);
                        }