Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f5ce5aa

Browse files
committed
Merge remote-tracking branch 'origin/develop-8.1' into merge-develop-8.1_30.05.17
2 parents 331237d + 9e5d6ad commit f5ce5aa

27 files changed

+281
-113
lines changed

docs/development/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Before running each test command, the test framework inserts a test library stac
7272
- `pTarget` is the object to which `pHandlerName` should be dispatched.
7373
- `pTimeOut` is the amount of milliseconds to continue testing the result of the handler.
7474
- `pParamsArray` is an array of parameters, keyed by the 1-based index of the required parameter to be passed to the handler.
75-
75+
* `TestAssertErrorDialog pDescription, pErrorCode`: Assert that this test triggers an errorDialog message with the given error.
7676
Tests can have additional setup requirements before running, for example loading custom libraries. If the script test contains a handler called `TestSetup`, this will be run prior to running each test command. For example:
7777
````
7878
on TestSetup

docs/notes/bugfix-17969.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fixed bug preventing correct rendering of ovals when creating them

docs/notes/bugfix-18670.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fixed bug preventing all table names being retrieved in MySQL db's

docs/notes/bugfix-19699.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fixed bug that overrides previous matches in matchText

docs/notes/bugfix-19742.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix crash when deleting an object when a socket has a reference to a deleted object

docs/notes/bugfix-19743.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix crash when checking a watched variable on a deleted object

engine/src/button.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ void MCButton::removelink(MCObject *optr)
395395
{
396396
if (menu.IsBound() && optr == menu)
397397
{
398+
if (this == MCmenuobjectptr)
399+
MCmenuobjectptr = nil;
400+
398401
MCValueAssign(menuname, kMCEmptyName);
399402
menu = nil;
400403
}

engine/src/funcs.cpp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,23 +1357,24 @@ void MCMatch::eval_ctxt(MCExecContext &ctxt, MCExecValue &r_value)
13571357
MCStringsEvalMatchText(ctxt, *t_source, *t_pattern, *t_results, t_result_count, r_value . bool_value);
13581358
r_value .type = kMCExecValueTypeBool;
13591359

1360-
if (!ctxt.HasError())
1360+
if (!r_value . bool_value || ctxt . HasError())
13611361
{
1362-
for (uindex_t i = 0; i < t_result_count; i++)
1363-
{
1364-
// AL-2014-09-09: [[ Bug 13359 ]] Make sure containers are used in case a param is a handler variable
1365-
// AL-2014-09-18: [[ Bug 13465 ]] Use auto class to prevent memory leak
1366-
MCContainer t_container;
1367-
if (!t_result_params->evalcontainer(ctxt, t_container))
1368-
{
1369-
ctxt . LegacyThrow(EE_MATCH_BADDEST);
1370-
return;
1371-
}
1372-
1373-
/* UNCHECKED */ t_container.set_valueref(t_results[i]);
1374-
1375-
t_result_params = t_result_params->getnext();
1376-
}
1362+
return;
1363+
}
1364+
1365+
for (uindex_t i = 0; i < t_result_count; i++)
1366+
{
1367+
// AL-2014-09-09: [[ Bug 13359 ]] Make sure containers are used in case a param is a handler variable
1368+
MCContainer t_container;
1369+
if (!t_result_params->evalcontainer(ctxt, t_container))
1370+
{
1371+
ctxt . LegacyThrow(EE_MATCH_BADDEST);
1372+
return;
1373+
}
1374+
1375+
/* UNCHECKED */ t_container.set_valueref(t_results[i]);
1376+
1377+
t_result_params = t_result_params->getnext();
13771378
}
13781379
}
13791380

engine/src/mcio.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ real8 IO_cleansockets(real8 ctime)
161161
s->revents->timeout = ctime + MCsockettimeout;
162162
if (s->wevents != NULL)
163163
s->wevents->timeout = ctime + MCsockettimeout;
164-
MCscreen->delaymessage(s->object, MCM_socket_timeout, MCNameGetString(s->name));
164+
165+
if (s->object.IsValid())
166+
MCscreen->delaymessage(s->object, MCM_socket_timeout, MCNameGetString(s->name));
165167
}
166168
if (s->wevents != NULL && s->wevents->timeout < etime)
167169
etime = s->wevents->timeout;
@@ -187,7 +189,8 @@ void IO_freeobject(MCObject *o)
187189
while (i < MCnsockets)
188190
#if 1
189191
{
190-
if (MCsockets[i]->object == o)
192+
if (!MCsockets[i]->object.IsValid() ||
193+
MCsockets[i]->object == o)
191194
MCsockets[i]->doclose();
192195
i++;
193196
}

engine/src/uidc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,9 @@ Boolean MCUIDC::wait(real8 duration, Boolean dispatch, Boolean anyevent)
937937
DoRunloopActions();
938938

939939
real8 eventtime = exittime;
940-
donepending = handlepending(curtime, eventtime, dispatch);
940+
donepending = handlepending(curtime, eventtime, dispatch) ||
941+
(dispatch && MCEventQueueDispatch());
942+
941943
siguser();
942944

943945
MCModeQueueEvents();

0 commit comments

Comments
 (0)