You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of ViewWin()),
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(), move g_active_views_.push_back(this); before CreateWindow line.
The text was updated successfully, but these errors were encountered:
@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.
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.The text was updated successfully, but these errors were encountered: