Skip to content

Commit

Permalink
fix for crash when wacom driver is not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-rgb committed Sep 29, 2017
1 parent 93d9bb7 commit d4eaa00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/easytab.h
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,8 @@ EasyTabResult EasyTab_Load_Ex(HWND Window,
if (!EasyTab->Dll)
{
OutputDebugStringA("Wintab32.dll not found.\n");
free(EasyTab);
EasyTab = NULL;
return EASYTAB_DLL_LOAD_ERROR;
}

Expand Down Expand Up @@ -1084,7 +1086,10 @@ EasyTabResult EasyTab_HandleEvent(HWND Window, UINT Message, LPARAM LParam, WPAR
PACKET PacketBuffer[EASYTAB_PACKETQUEUE_SIZE] = {0};

// Bring our context to the top.
EasyTab->WTOverlap(EasyTab->Context, TRUE);
if (EasyTab && EasyTab->WTOverlap)
{
EasyTab->WTOverlap(EasyTab->Context, TRUE);
}

EasyTab->NumPackets = 0;
#ifdef MILTON_EASYTAB
Expand Down
5 changes: 3 additions & 2 deletions src/sdl_milton.cc
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,9 @@ milton_main(char* file_to_open)

}
// Load EasyTab
if (EasyTab_Load(platform_state.hwnd) != EASYTAB_OK) {
milton_die_gracefully("Easy Tab Failed to load");
EasyTabResult easytab_res = EasyTab_Load(platform_state.hwnd);
if (easytab_res != EASYTAB_OK) {
milton_log("Easy Tab Failed to load. Code %d", easytab_res);
}
break;
}
Expand Down

0 comments on commit d4eaa00

Please sign in to comment.