it just checks if the pDrawable pointer is true or false - in C++ a non-zero value (for built in types) constitues true and a zero value is false.
so if pDrawable is non-zero (true) - it meant that the CreateTriangleShape() function returned a valid (non-zero) pointer
and the pDrawable->Draw() statement will be executed.
if CreateTriangleShape() could NOT create the triangle object it would return a zero value which would mean that if (pDrawable) would test as false and the pDrawable->Draw() statement would NOT be executed.