Skip to content

Commit d621595

Browse files
committed
Windows | Make primitive 127 (i.e. #primShowRectLeft:right:top:bottom:) more robust. Avoid the crash-on-startup "Aborting!!!! Color depth 0 not supported" in certain cases such as when getting an exception while processing the StartUpList before #beDisplay is called.
1 parent 8d7a445 commit d621595

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platforms/win32/vm/sqWin32Window.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,10 @@ ioShowDisplay(sqInt dispBits, sqInt width, sqInt height, sqInt depth,
23362336
/* ----- EXPERIMENTAL ----- */
23372337
lsbDisplay = depth < 0;
23382338
if (lsbDisplay) depth = -depth;
2339+
/* Use sane default if image omits to provide depth in time. For example,
2340+
* exception while processing the StartUpList before #beDisplay is called.
2341+
*/
2342+
if (depth == 0) depth = 32;
23392343

23402344
bmi = BmiForDepth(depth);
23412345
if (!bmi)

0 commit comments

Comments
 (0)