浏览代码

Merge pull request #1591 from MostafaHassan/pr_FixCrashInVisualShader

(Fix crash) in visual shader for curve remap node
Juan Linietsky 10 年之前
父节点
当前提交
b1bf4fcef2
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      modules/gdscript/gd_script.cpp
  2. 1 1
      tools/editor/plugins/shader_graph_editor_plugin.cpp

+ 1 - 1
modules/gdscript/gd_script.cpp

@@ -1689,7 +1689,7 @@ bool GDScript::_update_exports() {
 			}
 
 
-			if (c->extends_used && String(c->extends_file)!="") {
+			if (c->extends_used && String(c->extends_file)!="" && String(c->extends_file) != get_path()) {
 
 				String path = c->extends_file;
 				if (path.is_rel_path()) {

+ 1 - 1
tools/editor/plugins/shader_graph_editor_plugin.cpp

@@ -376,7 +376,7 @@ void GraphCurveMapEdit::_input_event(const InputEvent& p_event) {
 		update();
 	}
 
-	if (p_event.type==InputEvent::MOUSE_MOTION && grabbing) {
+	if (p_event.type==InputEvent::MOUSE_MOTION && grabbing  && grabbed != -1) {
 
 		Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
 		p.y=1.0-p.y;