Variable "mat2D" wasn't being checked for null, despite "tr" was checked for it.
https://github.com/wxWidgets/wxWidgets/pull/26303
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is consistent with the documentation, see interface/wx/affinematrix2dbase.h
/** Get the component values of the matrix. @param mat2D The rotational components of the matrix (upper 2 x 2), must be non-null. @param tr The translational components of the matrix, may be @NULL. */ virtual void Get(wxMatrix2D* mat2D, wxPoint2DDouble* tr) const = 0;
Crashing is still not very user-friendly, but AFAICS it makes no sense to call this function with null matrix (do you do it intentionally?), so we should probably add a wxCHECK_RET() to it, but not silently ignore the invalid calls.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It occured when I wanted to get just the translation part of the affine matrix. I didn't need the transformation matrix in that specific part of my code.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
OK, but then we need to update the documentation (under interface/wx) to not say that this parameter is required any longer, could you please do it?
And I'd still add at least a wxASSERT_MSG() checking that both of parameters are not null at the same time.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@SerdarPe pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@SerdarPe pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@SerdarPe pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Alright, I've updated the commit.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, will merge soon.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()