summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/fiber.cpp5
-rw-r--r--src/common/input.h7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/common/fiber.cpp b/src/common/fiber.cpp
index 62010d762..81b212e4b 100644
--- a/src/common/fiber.cpp
+++ b/src/common/fiber.cpp
@@ -124,7 +124,10 @@ void Fiber::YieldTo(std::weak_ptr<Fiber> weak_from, Fiber& to) {
// "from" might no longer be valid if the thread was killed
if (auto from = weak_from.lock()) {
- ASSERT(from->impl->previous_fiber != nullptr);
+ if (from->impl->previous_fiber == nullptr) {
+ ASSERT_MSG(false, "previous_fiber is nullptr!");
+ return;
+ }
from->impl->previous_fiber->impl->context = transfer.fctx;
from->impl->previous_fiber->impl->guard.unlock();
from->impl->previous_fiber.reset();
diff --git a/src/common/input.h b/src/common/input.h
index f775a4c01..f4f9eb30a 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -209,6 +209,13 @@ enum class ButtonNames {
Triangle,
Share,
Options,
+
+ // Mouse buttons
+ ButtonMouseWheel,
+ ButtonBackward,
+ ButtonForward,
+ ButtonTask,
+ ButtonExtra,
};
// Callback data consisting of an input type and the equivalent data status