Code Review
/
staging
/
windowmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
3ec58ac
)
App: thoroughly check LayoutState availability in activate too
author
Marcus Fritzsch
<marcus_fritzsch@mentor.com>
Tue, 12 Sep 2017 09:29:35 +0000
(11:29 +0200)
committer
Marcus Fritzsch
<marcus_fritzsch@mentor.com>
Tue, 12 Sep 2017 09:29:35 +0000
(11:29 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
src/app.cpp
patch
|
blob
|
history
diff --git
a/src/app.cpp
b/src/app.cpp
index
6708706
..
47fb85c
100644
(file)
--- a/
src/app.cpp
+++ b/
src/app.cpp
@@
-392,7
+392,13
@@
char const *App::activate_surface(char const *drawing_name) {
return "Surface is not on any layer!";
}
- struct LayoutState &state = **this->layers.get_layout_state(*surface_id);
+ auto o_state = *this->layers.get_layout_state(*surface_id);
+
+ if (! o_state) {
+ return "Could not find layer for surface";
+ }
+
+ struct LayoutState &state = *o_state;
// disable layers that are above our current layer
for (auto const &l : this->layers.mapping) {