Open bbsteel opened 10 years ago
@bbsteel why you didnt use github links? He mean move that to line 30.
@Enelar Sorry I am new to github. Now I see every source line is a link, thanks.
@bbsteel not blaming you. Just my style to give advices. Group of lines still link too(file#L10-20). Everything is link. Commit, diff, diff lines, function, class etc. etc.
@adamjs
I follow the readme and setting up and building project is fine, but when I run the project , it crashed.
After some analysis, I found the reason is in class ViewWin's constructor.
Before pushing back ViewWin's self pointer to the global view* vector ( the line
g_active_views_.push_back(this);
is in the end ofViewWin()
),Callback function
WndProc()
already get the pointer. (ViewWin* view = ViewWin::GetFromHandle(hWnd);
) .So it will get a null ViewWin pointer in
WndProc()
, then on WM_SIZE message , function call on null pointer cause crash.To fix it, in
ViewWin()
, moveg_active_views_.push_back(this);
beforeCreateWindow
line.