Skip to content
Snippets Groups Projects
Commit 9c738e3b authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Grab a copy of the sbbs_t * before destroying ourselves

We need it to return flags_ from the new instance since Win32 debug
builds set sbbs to 0xdddddddd when the object is destroyed.

Should fix issue #904
parent 4c3fbda9
No related branches found
No related tags found
No related merge requests found
Pipeline #8845 passed
...@@ -322,13 +322,17 @@ list_node_t *Terminal::find_hotspot(unsigned x, unsigned y) ...@@ -322,13 +322,17 @@ list_node_t *Terminal::find_hotspot(unsigned x, unsigned y)
uint32_t Terminal::flags(bool raw) uint32_t Terminal::flags(bool raw)
{ {
// Tuck away pointer to sbbs...
sbbs_t *sbbs_p = sbbs;
if (!raw) { if (!raw) {
uint32_t newflags = get_flags(sbbs); uint32_t newflags = get_flags(sbbs);
if (newflags != flags_) if (newflags != flags_)
update_terminal(sbbs); update_terminal(sbbs);
} }
// We have potentially destructed ourselves now...
return sbbs->term->flags_; // We have potentially destructed ourselves now... use the new object.
return sbbs_p->term->flags_;
} }
void Terminal::insert_indicator() { void Terminal::insert_indicator() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment