|
|
@@ -408,9 +408,13 @@ float ElementStyle::ResolveProperty(const String& name, float base_value)
|
|
|
{
|
|
|
Rocket::Core::ElementDocument* owner_document = element->GetOwnerDocument();
|
|
|
if (owner_document == NULL)
|
|
|
- return 0;
|
|
|
+ return 0.0f;
|
|
|
+
|
|
|
+ /// @TODO In release mode, using REM on a body tag will result in an infinite recursion loop
|
|
|
+ /// and eventually a stack overflow crash, this needs to be resolved.
|
|
|
+ ROCKET_ASSERTMSG(owner_document != element, "REM unit is not allowed on document or body root.");
|
|
|
|
|
|
- base_value = element->GetOwnerDocument()->ResolveProperty(FONT_SIZE, 0);
|
|
|
+ base_value = owner_document->ResolveProperty(FONT_SIZE, 0);
|
|
|
}
|
|
|
else
|
|
|
{
|