Skip to content

Commit

Permalink
Fix DSI issue when bitmap is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
capehill committed Mar 12, 2020
1 parent 23111bd commit 0218235
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,13 @@ static void query_window_size(Context *ctx)

static BOOL realloc_bitmap(Context *ctx)
{
const ULONG w = GetBitMapAttr(ctx->bm, BMA_ACTUALWIDTH);
const ULONG h = GetBitMapAttr(ctx->bm, BMA_HEIGHT);
ULONG w = 0;
ULONG h = 0;

if (ctx->bm) {
w = GetBitMapAttr(ctx->bm, BMA_ACTUALWIDTH);
h = GetBitMapAttr(ctx->bm, BMA_HEIGHT);
}

query_window_size(ctx);

Expand Down

0 comments on commit 0218235

Please sign in to comment.